Bug 1967774

Summary: Review Request: python-fabric - High level SSH command execution
Product: [Fedora] Fedora Reporter: Major Hayden 🤠 <mhayden>
Component: Package ReviewAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Ben Beasley <code>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: code, package-review
Target Milestone: ---Flags: code: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-10 17:33:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1953789    
Attachments:
Description Flags
Spec file patch to generate man page at build time
none
Spec file diff none

Description Major Hayden 🤠 2021-06-03 21:08:17 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02223910-python-fabric/python-fabric.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02223910-python-fabric/python-fabric-2.6.0-1.fc35.src.rpm

Description:
Fabric is a high level Python (2.7, 3.4+) library designed to execute shell
commands remotely over SSH, yielding useful Python objects in return. It builds
on top of Invoke (subprocess command execution and command-line features) and
Paramiko (SSH protocol implementation), extending their APIs to complement one
another and provide additional functionality.

Fedora Account System Username: mhayden

fedora-review output: https://copr-be.cloud.fedoraproject.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02223910-python-fabric/fedora-review/review.txt

Comment 1 Ben Beasley 2021-06-04 19:57:20 UTC
Package Review
==============

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

===== Issues =====

- This is a patch, so it should be sent upstream, or an issue filed if the
  downstream patch is not upstreamable:

    # Pathlib is included in python3, so there's no need to bring in pathlib2, which
    # is currently a dead project.
    sed -i 's/, "pathlib2"//' setup.py

  I sent a PR upstream, patching it a little differently so that it still
  worked with Python 2.7. Consider using my PR as a patch, instead, and linking
  it:

    # https://github.com/fabric/fabric/pull/2167
    Patch0:         fabric-2.6.0-conditional-pathlib2.patch

  At least link the PR in a comment above your sed command.

  It looks like upstream is far from active at the moment, and PR’s and issues
  are mostly languishing.

- Same here:

    # Upstream is supporting Python 2 + 3 at this time, so they rely on mock.
    sed -i 's/from mock/from unittest.mock/' tests/*.py fabric/testing/*.py

  And again, I sent a backwards-compatible PR upstream:

    # https://github.com/fabric/fabric/pull/2168
    Patch1:         fabric-2.6.0-conditional-mock.patch

- Please add

    %license LICENSE

  to the %files section.

- The License field says “MIT”, but it should be “BSD”.

- Since you are not using %pyproject_buildrequires, you must add

    BuildRequires:  python%{python3_pkgversion}-setuptools

  See
  https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/GCPGM34ZGEOVUHSBGZTRYR5XKHTIJ3T7/
  and
  https://fedoraproject.org/wiki/Changes/Reduce_dependencies_on_python3-setuptools.

- You should attempt to run the tests. (It turns out that’s not going to be
  possible right now, but the attempt to do so helped me to find the missing
  dependencies mentioned in the next issue.) Please add:

    # Enable if https://bugzilla.redhat.com/show_bug.cgi?id=1949502 /
    # https://github.com/bitprophet/pytest-relaxed/issues/12 is # resolved:
    %bcond_with tests

    %if %{with tests}
    # Runtime dependencies, needed for testing
    BuildRequires:  python%{python3_pkgversion}-invoke
    BuildRequires:  python%{python3_pkgversion}-paramiko
    # Extra “pytest” (a superset of extra “testing”)
    BuildRequires:  python%{python3_pkgversion}-pytest
    # Missing from setup.py (only in requirements-dev.txt), but still needed for
    # testing:
    BuildRequires:  python%{python3_pkgversion}-pytest-relaxed
    %endif

  and

    %check
    %if %{with tests}
    %pytest
    %endif

- Upstream defaults to using copies of six, lexicon, and decorator that are
  vendored by invoke as invoke.vendor.*. Since Fedora correctly removes the
  vendored copies from the python-invoke package, you must support the
  standalone packages in python-fabric.

  First, you must add BR’s (for testing) and (since the standalone dependencies
  are not in setup.py) also explicit Requires for the extra dependencies:

    %if %{with tests}
    # Runtime dependencies upstream assumed would be vendored with invoke, but
    # which we must use standalone
    BuildRequires:  python%{python3_pkgversion}-decorator
    BuildRequires:  python%{python3_pkgversion}-lexicon
    BuildRequires:  python%{python3_pkgversion}-six
    %endif
    
    # Runtime dependencies upstream assumed would be vendored with invoke, but
    # which we must use standalone
    Requires:       python%{python3_pkgversion}-decorator
    Requires:       python%{python3_pkgversion}-lexicon
    Requires:       python%{python3_pkgversion}-six

  Next, while upstream attempted to support using standalone dependencies (see
  the following changelog entry and also
  https://github.com/fabric/fabric/pull/1745)

    - :support:`1745 backported` Wrap any imports of ``invoke.vendor.*`` with
      ``try``/``except`` such that downstream packages which have removed
      ``invoke.vendor`` are still able to function by using stand-alone
      dependencies. Patch courtesy of Othmane Madjoudj.

  the unconditional imports of vendored packages slipped back in. So:

    # https://github.com/fabric/fabric/pull/2169
    Patch2:         fabric-2.6.0-wrap-invoke-vendor.patch

- It would be great if you could build and install the documentation in a -doc
  subpackage. I tried to, and I could get mostly-acceptable-looking
  documentation if I added

    # Patch out dependency on “releases” extension
    # (https://github.com/bitprophet/releases), which is not currently packaged
    sed -r -i '/extensions.append\("releases"\)/d' sites/www/conf.py

  in %prep, but there were still a bunch of broken intersphinx inventories and
  I got tired of messing with it. You may, or may not, be willing to work
  harder, or accept a “mostly-OK” result. If not, I would understand not
  building the documentation.

- Even if you don’t build the documentation, you should add:

    %doc README.rst

- A man page for a CLI tool is always wanted
  (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages). The
  help2man tool actually does a pretty good job in this case:

    BuildRequires:  help2man
    # You also must enable the BR’s for invoke/paramiko/decorator/lexicon/six
    # even if tests are disabled.

    %build
    […]
    # Entry point script that allows us to use help2man before installing
    cat > fab <<'EOF'
    #!%{__python3}
    from fabric.main import program
    program.run()
    EOF
    chmod +x fab
    PYTHONPATH="${PWD}" help2man --no-info --output fab.1 ./fab

    %install
    […]
    install -d %{buildroot}%{_mandir}/man1
    install -t %{buildroot}%{_mandir}/man1 -m 0644 -p fab.1

    %files …
    %{_mandir}/man1/fab.1*

===== 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 %license.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD 2-clause "Simplified" License", "Unknown or generated".
     102 files have unknown license. Detailed output of licensecheck in
     /home/reviewer/1967774-python-fabric/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.
[!]: Requires correct, justified where necessary.

     Upstream expects bundled dependencies under invoke.vendor, which are not
     available in Fedora. More Requires are needed; see Issues.

[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]: 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

     (except as noted)

[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.
[!]: Final provides and requires are sane (see attachments).

     More Requires are needed, as previously noted.

[!]: Package functions as described.

     Package is broken with missing Requires.

[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.
[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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-fabric-2.6.0-1.fc35.noarch.rpm
          python-fabric-2.6.0-1.fc35.src.rpm
python3-fabric.noarch: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
python3-fabric.noarch: W: no-documentation
python3-fabric.noarch: W: no-manual-page-for-binary fab
python-fabric.src: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
2 packages and 0 specfiles checked; 0 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
python3-fabric.noarch: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
python3-fabric.noarch: W: no-documentation
python3-fabric.noarch: W: no-manual-page-for-binary fab
1 packages and 0 specfiles checked; 0 errors, 3 warnings.



Source checksums
----------------
https://files.pythonhosted.org/packages/source/f/fabric/fabric-2.6.0.tar.gz :
  CHECKSUM(SHA256) this package     : 47f184b070272796fd2f9f0436799e18f2ccba4ee8ee587796fca192acd46cd2
  CHECKSUM(SHA256) upstream package : 47f184b070272796fd2f9f0436799e18f2ccba4ee8ee587796fca192acd46cd2


Requires
--------
python3-fabric (rpmlib, GLIBC filtered):
    (python3.9dist(invoke) < 2 with python3.9dist(invoke) >= 1.3)
    /usr/bin/python3
    python(abi)
    python3.9dist(paramiko)
    python3.9dist(setuptools)



Provides
--------
python3-fabric:
    python-fabric
    python3-fabric
    python3.9-fabric
    python3.9dist(fabric)
    python3dist(fabric)



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

Comment 2 Major Hayden 🤠 2021-06-04 20:32:47 UTC
I'm working on the fixes now, but I couldn't get that help2man/fab stuff to work.

+ cat
+ chmod +x fab
+ PYTHONPATH=/builddir/build/BUILD/fabric-2.6.0
+ help2man --no-info --output fab.1 ./fab
help2man: can't get `--help' info from ./fab
Try `--no-discard-stderr' if option outputs to stderr
error: Bad exit status from /var/tmp/rpm-tmp.xn69P6 (%build)

Comment 3 Ben Beasley 2021-06-04 20:46:14 UTC
Hmm… the help2man command works for me. Probably a typo somewhere. If you can’t get it working, I can offer a spec-file patch or PR after the review is done.

Comment 4 Major Hayden 🤠 2021-06-04 21:12:33 UTC
Spec URL: https://fedorapeople.org/~mhayden/python-fabric.spec
SRPM URL: https://fedorapeople.org/~mhayden/python-fabric-2.6.0-1.fc34.src.rpm

I generated a man page with help2man via a virtualenv and added it to the package. An auto-generated man page would be nice, but this project isn't moving terribly quickly lately. 😞

Comment 5 Ben Beasley 2021-06-06 10:41:49 UTC
I’m re-reviewing now.

I forgot to actually upload the patches I mentioned. Sorry you had to generate them yourself!

Comment 6 Ben Beasley 2021-06-06 11:00:37 UTC
See

> # Enable if https://bugzilla.redhat.com/show_bug.cgi?id=1949502 /
> # https://github.com/bitprophet/pytest-relaxed/issues/12 is resolved:
> %bcond_with tests

in the original review. You can’t enable the tests while pytest-relaxed is broken, because you get:

> DEBUG util.py:444:  Error:
> DEBUG util.py:444:   Problem: conflicting requests
> DEBUG util.py:444:    - nothing provides (python3.9dist(decorator) < 5 with python3.9dist(decorator) >= 4) needed by python3-pytest-relaxed-1.1.5-11.fc34.noarch
> DEBUG util.py:444:    - nothing provides (python3.9dist(pytest) < 5 with python3.9dist(pytest) >= 3) needed by python3-pytest-relaxed-1.1.5-11.fc34.noarch
> DEBUG util.py:446:  (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Maybe it works on F33? I had tried it on F34 and F35 with the same result.

Comment 7 Ben Beasley 2021-06-06 11:06:00 UTC
Created attachment 1789107 [details]
Spec file patch to generate man page at build time

I have tested this patch to the spec file; it successfully generates the man page at build time.

Maybe the reason you had trouble was forgetting to unconditionally BR the runtime dependencies, so the executable errored out?

Comment 8 Major Hayden 🤠 2021-06-07 12:31:53 UTC
Spec URL: https://fedorapeople.org/~mhayden/python-fabric.spec
SRPM URL: https://fedorapeople.org/~mhayden/python-fabric-2.6.0-1.fc34.src.rpm

Hmm, I must have gotten wrapped around the axle on some of the build requirements because after applying your patch, it seems to build just fine. Thanks for showing me how to do that! I can use that in some other places, too.

Comment 9 Ben Beasley 2021-06-07 15:23:31 UTC
Thanks, I’ll take a look at it.

> # Tests are disabled by default. 😞

Still getting mileage out of rofimoji, I see! 🍻

Comment 10 Major Hayden 🤠 2021-06-07 15:24:52 UTC
Gotta eat my own dog food! 🐕 (Or perhaps drink my own champagne? 🥂)

Thanks again. 🤗 🤗 🤗

Comment 11 Ben Beasley 2021-06-08 13:32:20 UTC
Almost there!

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

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

===== Issues =====

- You still need manual Requires on the dependencies unbundled from python-invoke.
  Add them to the python3-fabric subpackage. Upstream expects them to be
  vendored/bundled in invoke, so they are not in the metadata generated from
  setup.py, and the Python automatic dependency generator has no way to know
  about them.

    %package -n python3-%{srcname}
    Summary:        %{summary}
    # Runtime dependencies upstream assumed would be vendored with invoke, but
    # which we must use standalone
    Requires:       python%{python3_pkgversion}-decorator
    Requires:       python%{python3_pkgversion}-lexicon
    Requires:       python%{python3_pkgversion}-six
    
    %description -n python3-%{srcname} %{_description}

- As noted before, if you ever figure out how to build the documentation
  acceptably and install it in a -doc subpackage… great!

===== 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: "BSD 2-clause "Simplified" License", "Unknown or generated".
     102 files have unknown license. Detailed output of licensecheck in
     /home/reviewer/1967774-python-fabric/review3/1967774-python-
     fabric/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.
[!]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[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]: 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.
[!]: Final provides and requires are sane (see attachments).

     Missing manual Requires for dependencies unbundled from python-invoke.

[!]: Package functions as described.

     Will break due to missing manual Requires.

[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.
[-]: %check is present and all tests pass.

     Tests are disabled with justification.

[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).

     Note that

       python-fabric.src:75: W: macro-in-comment %{__python3}

     is a false positive; this is a shebang line in a shell here-document, and
     we WANT the macro to be expanded.

[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-fabric-2.6.0-1.fc35.noarch.rpm
          python-fabric-2.6.0-1.fc35.src.rpm
python3-fabric.noarch: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
python-fabric.src: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
python-fabric.src:75: W: macro-in-comment %{__python3}
2 packages and 0 specfiles checked; 0 errors, 3 warnings.




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


Source checksums
----------------
https://files.pythonhosted.org/packages/source/f/fabric/fabric-2.6.0.tar.gz :
  CHECKSUM(SHA256) this package     : 47f184b070272796fd2f9f0436799e18f2ccba4ee8ee587796fca192acd46cd2
  CHECKSUM(SHA256) upstream package : 47f184b070272796fd2f9f0436799e18f2ccba4ee8ee587796fca192acd46cd2


Requires
--------
python3-fabric (rpmlib, GLIBC filtered):
    (python3.9dist(invoke) < 2 with python3.9dist(invoke) >= 1.3)
    /usr/bin/python3
    python(abi)
    python3.9dist(paramiko)
    python3.9dist(setuptools)



Provides
--------
python3-fabric:
    python-fabric
    python3-fabric
    python3.9-fabric
    python3.9dist(fabric)
    python3dist(fabric)



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

Comment 12 Major Hayden 🤠 2021-06-08 14:23:15 UTC
(In reply to Ben Beasley from comment #11)
> - You still need manual Requires on the dependencies unbundled from
> python-invoke.
>   Add them to the python3-fabric subpackage. Upstream expects them to be
>   vendored/bundled in invoke, so they are not in the metadata generated from
>   setup.py, and the Python automatic dependency generator has no way to know
>   about them.
> 
>     %package -n python3-%{srcname}
>     Summary:        %{summary}
>     # Runtime dependencies upstream assumed would be vendored with invoke,
> but
>     # which we must use standalone
>     Requires:       python%{python3_pkgversion}-decorator
>     Requires:       python%{python3_pkgversion}-lexicon
>     Requires:       python%{python3_pkgversion}-six
>     
>     %description -n python3-%{srcname} %{_description}

Ah, I didn't follow your logic before, but I understand now. I think I've fixed this appropriately now. Thank you.

> - As noted before, if you ever figure out how to build the documentation
>   acceptably and install it in a -doc subpackage… great!

I added it!

Spec URL: https://download.copr.fedorainfracloud.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02241351-python-fabric/python-fabric.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02241351-python-fabric/python-fabric-2.6.0-1.fc35.src.rpm

Comment 13 Ben Beasley 2021-06-08 14:51:06 UTC
I’m just going to review the diff between this and the previous spec file.

===== Notes =====

- You have replaced %{python3_pkgversion} with “3”. Great for Fedora, and, I think, OK for EPEL8
  too.

- You have switched to %forge… macros to reference source, and are using them correctly.

- You added “%global distprefix %{nil}” to keep snapshot versioning from being applied to the
  dist tag as a result of using “%global tag …” with the %forge… macros (which you had to do
  because the normal release style assumes tags look like “v%{version}” but this package just
  uses “%{version}”). This is OK, I think, although I tend to leave it alone and just let the
  %forge… macros do their thing.

  Just don’t forget to stop overriding distprefix if you later have to set “%global commit …”
  instead.

- You have added a doc package. Great! It looks sane. It correctly installs the license file,
  too.

===== Issues =====

- You added duplicate BuildRequires for the unbundled dependencies under python3-fabric,
  rather than adding Requires, so the runtime Requires are still incomplete.

Comment 14 Ben Beasley 2021-06-08 14:52:25 UTC
Created attachment 1789385 [details]
Spec file diff

Spec file diff I used for the “mini-review” I just posted.

Comment 15 Major Hayden 🤠 2021-06-08 15:06:56 UTC
(In reply to Ben Beasley from comment #13)
> ===== Notes =====
> 
> - You have replaced %{python3_pkgversion} with “3”. Great for Fedora, and, I
> think, OK for EPEL8
>   too.

Okay, good. That was one of your suggestions from the reviews above and it simplifies things a little.

> - You have switched to %forge… macros to reference source, and are using
> them correctly.

🎉

> - You added “%global distprefix %{nil}” to keep snapshot versioning from
> being applied to the
>   dist tag as a result of using “%global tag …” with the %forge… macros
> (which you had to do
>   because the normal release style assumes tags look like “v%{version}” but
> this package just
>   uses “%{version}”). This is OK, I think, although I tend to leave it alone
> and just let the
>   %forge… macros do their thing.
> 
>   Just don’t forget to stop overriding distprefix if you later have to set
> “%global commit …”
>   instead.

Thanks! I will keep that in mind if I switch from tags/releases to commits (which I hope I don't have to do anytime soon). 😉

> - You have added a doc package. Great! It looks sane. It correctly installs
> the license file,
>   too.

🥳

> ===== Issues =====
> 
> - You added duplicate BuildRequires for the unbundled dependencies under
> python3-fabric,
>   rather than adding Requires, so the runtime Requires are still incomplete.

Fixed.

Spec URL: https://download.copr.fedorainfracloud.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02241394-python-fabric/python-fabric.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/mhayden/azure-cli/fedora-rawhide-x86_64/02241394-python-fabric/python-fabric-2.6.0-1.fc35.src.rpm

Comment 16 Ben Beasley 2021-06-09 21:25:19 UTC
Looks good! This was a slog, but I think it turned out well!

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

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


Issues:
=======
- Sources used to build the package match the upstream source, as provided
  in the spec URL.
  Note: Upstream MD5sum check error, diff is in
  /home/reviewer/1967774-python-fabric/review5/1967774-python-
  fabric/diff.txt
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/

  This looks innocuous.

===== 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: "BSD 2-clause "Simplified" License", "Unknown or generated".
     102 files have unknown license. Detailed output of licensecheck in
     /home/reviewer/1967774-python-fabric/review5/1967774-python-
     fabric/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.
[-]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[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 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]: 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.
[ ]: 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-fabric
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[]: 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.
[-]: %check is present and all tests pass.

     Tests are disabled with justification.

[ ]: 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:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Bad spec filename: /home/reviewer/1967774-python-
     fabric/review5/1967774-python-fabric/srpm-unpacked/python-fabric.spec
     See: (this test has no URL)

     I don’t know. Looks OK.

[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: python3-fabric-2.6.0-1.fc35.noarch.rpm
          python-fabric-doc-2.6.0-1.fc35.noarch.rpm
          python-fabric-2.6.0-1.fc35.src.rpm
python3-fabric.noarch: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
python-fabric-doc.noarch: W: description-shorter-than-summary
python-fabric.src: W: spelling-error %description -l en_US subprocess -> sub process, sub-process, processors
python-fabric.src:97: W: macro-in-comment %{__python3}
3 packages and 0 specfiles checked; 0 errors, 4 warnings.




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


Source checksums
----------------
https://github.com/fabric/fabric/archive/2.6.0/fabric-2.6.0.tar.gz :
  CHECKSUM(SHA256) this package     : 47f184b070272796fd2f9f0436799e18f2ccba4ee8ee587796fca192acd46cd2
  CHECKSUM(SHA256) upstream package : a03ab8f6ee44f212f005b8f099bf5d18a17ebbe9dfc2dbe9eba11172746fe99d
diff -r also reports differences


Requires
--------
python3-fabric (rpmlib, GLIBC filtered):
    (python3.9dist(invoke) < 2 with python3.9dist(invoke) >= 1.3)
    /usr/bin/python3
    python(abi)
    python3-decorator
    python3-lexicon
    python3-six
    python3.9dist(paramiko)
    python3.9dist(setuptools)

python-fabric-doc (rpmlib, GLIBC filtered):



Provides
--------
python3-fabric:
    python-fabric
    python3-fabric
    python3.9-fabric
    python3.9dist(fabric)
    python3dist(fabric)

python-fabric-doc:
    python-fabric-doc



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

Comment 17 Major Hayden 🤠 2021-06-09 22:56:48 UTC
(In reply to Ben Beasley from comment #16)
> Looks good! This was a slog, but I think it turned out well!

Thanks for your patience and continued help on this one, Ben! 🎉

Comment 18 Gwyn Ciesla 2021-06-10 00:16:43 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-fabric

Comment 19 Fedora Update System 2021-06-10 17:30:33 UTC
FEDORA-2021-22755a65c6 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-22755a65c6

Comment 20 Fedora Update System 2021-06-10 17:30:34 UTC
FEDORA-2021-e5c603142f has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e5c603142f

Comment 21 Fedora Update System 2021-06-11 01:42:42 UTC
FEDORA-2021-22755a65c6 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-22755a65c6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-22755a65c6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2021-06-11 02:07:56 UTC
FEDORA-2021-e5c603142f has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e5c603142f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e5c603142f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2021-06-19 01:08:27 UTC
FEDORA-2021-e5c603142f has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2021-06-19 01:14:05 UTC
FEDORA-2021-22755a65c6 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.