Bug 1562643

Summary: Review Request: python-slixmpp - Slixmpp is an XMPP library for Python 3.4+
Product: [Fedora] Fedora Reporter: Matthieu Saulnier <casper>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mail, package-review, zebob.m
Target Milestone: ---Flags: zebob.m: 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: 2018-05-07 02:00:07 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: 1551479    

Description Matthieu Saulnier 2018-04-01 20:55:20 UTC
Spec URL: https://fantom.fedorapeople.org/python3-slixmpp.spec
SRPM URL: https://fantom.fedorapeople.org/python3-slixmpp-1.3.0-1.fc27.src.rpm
Description: 
Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork
of SleekXMPP. Goals is to only rewrite the core of the library (the low
level socket handling, the timers, the events dispatching) in order to
remove all threads.

Fedora Account System Username: fantom

Comment 1 Fabian Affolter 2018-04-02 10:47:22 UTC
I would like to suggest that you make the package python3-only. Use `%py3_*` and its friends.

Comment 2 Robert-André Mauchin 🐧 2018-04-02 12:21:00 UTC
 - The name of the package should be python-slixmpp with a python3 subpackage

 - Not needed:

# package is Python 3.4+ compatible only
%global __python %{__python3}

 - Not needed, it's already defined

# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?__python2: %global __python2 %__python}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

 - Considering you do not provide a Python 2 package, this is not useful:

%if 0%{?fedora}
%bcond_without python3
%else
%bcond_with python3
%endif

 - There's no need to duplicate the source code like you do here:

mv %{srcname}-slix-%{version} python2
# Apply patches
pushd python2
%patch0 -p0
popd

%if %{with python3}
cp -a python2 python3
%endif # with python3

 - Use the provided macros:

CFLAGS="%{optflags}" %{__python3} setup.py build ⇒ %py3_build

%{__python3} setup.py install -O1 --skip-build --root %{buildroot} ⇒ %py3_install

 - No need for rm -rf %{buildroot}

 - Not needed

# Install html docs
mkdir -p %{buildroot}%{_pkgdocdir}/
cp -pr python3/docs/_build/html %{buildroot}%{_pkgdocdir}/

Just install them with %doc

 - Add "examples" to %doc



Here's my take on your SPEC:



%global srcname slixmpp

Name:           python-slixmpp
Version:        1.3.0
Release:        1%{?dist}
Summary:        Slixmpp is an XMPP library for Python 3.4+

License:        MIT
URL:            https://github.com/poezio/%{srcname}
Source0:        https://github.com/poezio/%{srcname}/archive/slix-%{version}/%{name}-%{version}.tar.gz
Patch0:         patch-remove-aiodns-dependancy.patch


BuildRequires:  python3-devel
BuildRequires:  python3-Cython
BuildRequires:  libidn-devel
# for docs
BuildRequires:  python3-sphinx
# for tests
BuildRequires:  gnupg
Requires:       python3-pyasn1-modules


%description
Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork
of SleekXMPP. Goals is to only rewrite the core of the library (the low
level socket handling, the timers, the events dispatching) in order to
remove all threads.


%package -n python3-%{srcname}
Summary:        Slixmpp is an XMPP library for Python 3.4+
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork
of SleekXMPP. Goals is to only rewrite the core of the library (the low
level socket handling, the timers, the events dispatching) in order to
remove all threads.


%prep
%autosetup -p0 -n %{srcname}-slix-%{version}


%build
%py3_build

# Build sphinx documentation
pushd docs/
make html
rm -rf _build/html/.{doctrees,buildinfo}
popd


%install
%py3_install

# Fix non-standard modes (775)
chmod 0755 %{buildroot}%{python3_sitearch}/%{srcname}/stringprep.cpython-*.so


%check
%{__python3} run_tests.py


%files -n python3-%{srcname}
%license LICENSE
%doc CONTRIBUTING.rst README.rst docs/_build/html examples
%{python3_sitearch}/%{srcname}-%{version}-py3.6.egg-info/
%{python3_sitearch}/%{srcname}/


%changelog
* Sun Apr  1 2018 Matthieu Saulnier <fantom> - 1.3.0-1
- Initial package

Comment 3 Robert-André Mauchin 🐧 2018-04-02 12:29:13 UTC
Also split the doc in a separate subpackage:

 - Large documentation must go in a -doc subpackage. Large could be size
  (~1MB) or number of files.
  Note: Documentation size is 3706880 bytes in 186 files.
  See:
  http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation

Comment 4 Matthieu Saulnier 2018-04-02 20:54:02 UTC
hi! thanks for your observations :)

I made a huge cleanup to remove useless stuff. Also I reused some stuff for the doc subpackage in %%install section.

Spec URL: https://fantom.fedorapeople.org/python-slixmpp.spec
SRPM URL: https://fantom.fedorapeople.org/python-slixmpp-1.3.0-2.fc27.src.rpm

Comment 5 Robert-André Mauchin 🐧 2018-04-02 23:35:36 UTC
 - Own %{_pkgdocdir}

[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/doc/python-slixmpp


Package otherwise approved. Fix the aforementioned issue before import.


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

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


===== MUST items =====

C/C++:
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.

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: "GPL", "Unknown or generated", "MIT/X11 (BSD like)", "MIT/X11
     (BSD like) BSD (3 clause)", "BSD (3 clause)", "BSD (unspecified)". 502
     files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-slixmpp/review-python-
     slixmpp/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/doc/python-slixmpp
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/doc/python-slixmpp
[x]: %build honors applicable compiler flags or justifies otherwise.
[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]: Useful -debuginfo package or justification otherwise.
[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]: 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]: Binary eggs must be removed in %prep

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

Generic:
[-]: Uses parallel make %{?_smp_mflags} macro.
[-]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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-slixmpp
[?]: Package functions as described.
[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.
[-]: 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]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-slixmpp-1.3.0-2.fc29.x86_64.rpm
          python-slixmpp-doc-1.3.0-2.fc29.noarch.rpm
          python-slixmpp-debugsource-1.3.0-2.fc29.x86_64.rpm
          python-slixmpp-1.3.0-2.fc29.src.rpm
python-slixmpp-doc.noarch: W: spelling-error %description -l en_US reST -> rest, re ST, re-ST
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/IoT_TestDevice.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/adhoc_provider.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/adhoc_user.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/admin_commands.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/confirm_answer.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/confirm_ask.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/custom_stanzas/custom_stanza_provider.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/custom_stanzas/custom_stanza_user.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/disco_browser.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/download_avatars.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/echo_client.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/echo_component.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/gtalk_custom_domain.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/http_over_xmpp.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/ibb_transfer/ibb_receiver.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/ibb_transfer/ibb_sender.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/mam.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/markup.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/migrate_roster.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/muc.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/ping.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/proxy_echo_client.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/pubsub_client.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/pubsub_events.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/register_account.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/roster_browser.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/rpc_async.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/rpc_client_side.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/rpc_server_side.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/s5b_transfer/s5b_receiver.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/s5b_transfer/s5b_sender.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/send_client.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/set_avatar.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/thirdparty_auth.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/user_location.py /usr/bin/env python3
python-slixmpp-doc.noarch: E: wrong-script-interpreter /usr/share/doc/python-slixmpp-doc/examples/user_tune.py /usr/bin/env python3
python-slixmpp-debugsource.x86_64: W: no-documentation
4 packages and 0 specfiles checked; 36 errors, 2 warnings.

Comment 6 Matthieu Saulnier 2018-04-10 14:51:08 UTC
thanks again for the review :)

SCM repo request: https://pagure.io/releng/fedora-scm-requests/issue/5882

Comment 7 Gwyn Ciesla 2018-04-10 15:50:20 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-slixmpp

Comment 8 Fedora Update System 2018-04-28 15:49:30 UTC
python-slixmpp-1.3.0-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f82aa08235

Comment 9 Fedora Update System 2018-04-28 15:50:18 UTC
python-slixmpp-1.3.0-5.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ab2902cfe0

Comment 10 Fedora Update System 2018-04-28 15:51:17 UTC
python-slixmpp-1.3.0-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0d826cd39b

Comment 11 Fedora Update System 2018-04-28 22:38:11 UTC
python-slixmpp-1.3.0-5.fc26 has been pushed to the Fedora 26 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-0d826cd39b

Comment 12 Fedora Update System 2018-04-29 09:41:52 UTC
python-slixmpp-1.3.0-5.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-f82aa08235

Comment 13 Fedora Update System 2018-04-29 14:29:40 UTC
python-slixmpp-1.3.0-5.fc27 has been pushed to the Fedora 27 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-ab2902cfe0

Comment 14 Fedora Update System 2018-05-07 02:00:07 UTC
python-slixmpp-1.3.0-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2018-05-07 03:38:04 UTC
python-slixmpp-1.3.0-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2018-05-07 04:15:12 UTC
python-slixmpp-1.3.0-5.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.