Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1643778 - Review Request: pyOCD - Tool for programming and debugging Arm Cortex-M microcontrollers using CMSIS-DAP [NEEDINFO]
Summary: Review Request: pyOCD - Tool for programming and debugging Arm Cortex-M micro...
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1800858 1643764
Blocks: IoT
TreeView+ depends on / blocked
 
Reported: 2018-10-28 16:53 UTC by Peter Robinson
Modified: 2021-06-30 05:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:
zebob.m: fedora-review?
zebob.m: needinfo? (pbrobinson)


Attachments (Terms of Use)

Description Peter Robinson 2018-10-28 16:53:58 UTC
SPEC: https://pbrobinson.fedorapeople.org/pyOCD.spec
SRPM: https://pbrobinson.fedorapeople.org/pyOCD-0.13.0-0.1.b2.fc29.src.rpm

Description:
Open source tool written in Python for programming and debugging Arm Cortex-M
microcontrollers using CMSIS-DAP.

pyOCD is an open source Python tool for programming and debugging Arm Cortex-M
microcontrollers using multiple supported types of USB debug probes. It is
fully cross-platform, with support for Linux, macOS, and Windows.

Several command line tools are provided that cover most use cases, or you can
make use of the Python API to enable low-level target control. A common use
for the Python API is to run and control CI tests.

Three tools give you total control over your device:

* pyocd-gdbserver: GDB remote server allows you to debug using gdb via either
  GNU MCU Eclipse plug-in or the console.
* pyocd-flashtool: Program and erase an MCU's flash memory.
* pyocd-tool: Interactive REPL control and inspection of the MCU.

Comment 1 Robert-André Mauchin 🐧 2018-11-08 19:54:29 UTC
https://github.com/mbedmicro/pyOCD/archive/v%{version}%{?candidate:%{candidate}}.tar.gz#/%{name}-%{version}%{?candidate:%{candidate}}.tar.gz 
⇒ %url/archive/v%{version}%{?candidate:%{candidate}}/%{name}-%{version}%{?candidate:%{candidate}}.tar.gz

 - You're missing a dep:

BUILDSTDERR: Download error on https://pypi.org/simple/setuptools_scm_git_archive/: [Errno -2] Name or service not known -- Some packages may not be found!
BUILDSTDERR: Download error on https://pypi.org/simple/setuptools-scm-git-archive/: [Errno -2] Name or service not known -- Some packages may not be found!
BUILDSTDERR: Couldn't find index page for 'setuptools_scm_git_archive' (maybe misspelled?)
BUILDSTDERR: Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!


    Add:

BuildRequires: python3-setuptools_scm_git_archive

 - Remove the shebangs:

pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/flash_tool.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/flash_tool.py 644 /usr/bin/env python
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/gdb_server.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/gdb_server.py 644 /usr/bin/env python
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/pyocd.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/pyocd.py 644 /usr/bin/env python

 - Your changelog entry doesn't match the header Version-Release:

* Sun Oct 28 2018 Peter Robinson <pbrobinson> 0.13.0-1.b2



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

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



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

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* Apache License (v2.0)", "Apache License (v2.0)
     Creative Commons CC0 Public License", "Unknown or generated", "Apache
     License (v2.0)". 66 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/pyOCD/review-
     pyOCD/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.
[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 20480 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 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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[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: pyOCD-0.13.0-0.1.b2.fc30.noarch.rpm
          pyOCD-0.13.0-0.1.b2.fc30.src.rpm
pyOCD.noarch: W: spelling-error Summary(en_US) microcontrollers -> micro controllers, micro-controllers, microelectronics
pyOCD.noarch: W: spelling-error %description -l en_US microcontrollers -> micro controllers, micro-controllers, microelectronics
pyOCD.noarch: W: spelling-error %description -l en_US macOS -> ma Cos, mac OS, mac-OS
pyOCD.noarch: W: spelling-error %description -l en_US gdb -> db, gab, gob
pyOCD.noarch: W: spelling-error %description -l en_US flashtool -> flash tool, flash-tool, flashlight
pyOCD.noarch: W: incoherent-version-in-changelog 0.13.0-1.b2 ['0.13.0-0.1.b2.fc30', '0.13.0-0.1.b2']
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/flash_tool.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/flash_tool.py 644 /usr/bin/env python
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/gdb_server.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/gdb_server.py 644 /usr/bin/env python
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/pyocd.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/pyocd.py 644 /usr/bin/env python
pyOCD.noarch: W: no-manual-page-for-binary pyocd-flashtool
pyOCD.noarch: W: no-manual-page-for-binary pyocd-gdbserver
pyOCD.noarch: W: no-manual-page-for-binary pyocd-tool
pyOCD.src: W: spelling-error Summary(en_US) microcontrollers -> micro controllers, micro-controllers, microelectronics
pyOCD.src: W: spelling-error %description -l en_US microcontrollers -> micro controllers, micro-controllers, microelectronics
pyOCD.src: W: spelling-error %description -l en_US macOS -> ma Cos, mac OS, mac-OS
pyOCD.src: W: spelling-error %description -l en_US gdbserver -> observer
pyOCD.src: W: spelling-error %description -l en_US gdb -> db, gab, gob
pyOCD.src: W: spelling-error %description -l en_US flashtool -> flash tool, flash-tool, flashlight
2 packages and 0 specfiles checked; 6 errors, 15 warnings.

Comment 2 Peter Robinson 2020-02-02 15:03:31 UTC
SPEC: https://pbrobinson.fedorapeople.org/pyOCD.spec
SRPM: https://pbrobinson.fedorapeople.org/pyOCD-0.24.1-1.fc31.src.rpm

I think most of the bits above should be OK now. Also needs cmsis-pack-manager packaged now, in progress, and the intelhex review.

Comment 4 Robert-André Mauchin 🐧 2020-02-10 23:30:38 UTC
- You haven't fixed any error I reported:

Download error on https://pypi.org/simple/setuptools_scm_git_archive/: [Errno -2] Name or service not known -- Some packages may not be found!
Download error on https://pypi.org/simple/setuptools-scm-git-archive/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm_git_archive' (maybe misspelled?)
Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for setuptools_scm_git_archive
Traceback (most recent call last):
  File "setup.py", line 30, in <module>
    setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
    dist = best[req.key] = env.best_match(
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 787, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 678, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm_git_archive')
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.rsguBw (%build)

   Add:

BuildRequires: python3-setuptools_scm_git_archive

 - https://github.com/mbedmicro/pyOCD/archive/v%{version}%{?candidate:%{candidate}}.tar.gz#/%{name}-%{version}%{?candidate:%{candidate}}.tar.gz 
⇒ %url/archive/v%{version}%{?candidate:%{candidate}}/%{name}-%{version}%{?candidate:%{candidate}}.tar.gz

 - Remove the shebangs:

pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/flash_tool.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/flash_tool.py 644 /usr/bin/env python
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/gdb_server.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/gdb_server.py 644 /usr/bin/env python
pyOCD.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/pyOCD/tools/pyocd.py /usr/bin/env python
pyOCD.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/pyOCD/tools/pyocd.py 644 /usr/bin/env python

Comment 5 Andy Mender 2020-06-20 11:40:18 UTC
@Peter Robinson

It might be worth having a look at the Python packaging guidelines as well :)
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/

Comment 6 Package Review 2021-06-21 00:45:24 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time, but it seems
that the review is still being working out by you. If this is right, please
respond to this comment clearing the NEEDINFO flag and try to reach out the
submitter to proceed with the review.

If you're not interested in reviewing this ticket anymore, please clear the
fedora-review flag and reset the assignee, so that a new reviewer can take
this ticket.

Without any reply, this request will shortly be resetted.


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