Bug 1276837 - (python-pydicom) Review Request: python-pydicom - Read, modify and write DICOM files with python code
Review Request: python-pydicom - Read, modify and write DICOM files with pyth...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Julien Enselme
Fedora Extras Quality Assurance
:
Depends On:
Blocks: fedora-neuro python-nibabel python-pysegbase
  Show dependency treegraph
 
Reported: 2015-10-31 06:14 EDT by Igor Gnatenko
Modified: 2015-12-05 22:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-22 19:25:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jujens: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Igor Gnatenko 2015-10-31 06:14:45 EDT
Spec URL: http://copr-dist-git.fedorainfracloud.org/cgit/ignatenkobrain/neurofedora/python-pydicom.git/plain/python-pydicom.spec?id=f106ea36fa720aa5a855681d01cbd60c4c1dde47
SRPM URL: https://ignatenkobrain.fedorapeople.org/for-review/python-pydicom-1.0.0-0.0.gitf6191c7.fc24.src.rpm
Description:
pydicom is a pure python package for working with DICOM files. It was made for
inspecting and modifying DICOM data in an easy "pythonic" way. The
modifications can be written again to a new file.

pydicom is not a DICOM server, and is not primarily about viewing images. It is
designed to let you manipulate data elements in DICOM files with python code.

Limitations -- the main limitation of the current version is that compressed
pixel data (e.g. JPEG) cannot be altered in an intelligent way as it can for
uncompressed pixels. Files can always be read and saved, but compressed pixel
data cannot easily be modified.
Fedora Account System Username: ignatenkobrain
Comment 3 Julien Enselme 2015-11-08 11:07:53 EST
Hi,

Before doing a full review of this package, I have some questions/remarks:

- I think the initial release tag is incorrect and should be 0.1.git%{shortcommit}%{?dist} instead of 0.0.git%{shortcommit}%{?dist} (so the current release tag should be 0.2.git%{shortcommit}%{?dist}) See https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages
- Please add %license pydicom/license.txt to all subpackage to install the license file where it is expected to be.

- According to the license file, some part of the software are bundled with pydicom and distributed under a different license:

> Portions of pydicom (private dictionary file(s)) were generated from the private dictionary of the GDCM library, released under the following license:

>  Program: GDCM (Grassroots DICOM). A DICOM library
>  Module:  http://gdcm.sourceforge.net/Copyright.html

However, I don't know which files this relates to. Do you have more information on that?
Comment 4 Igor Gnatenko 2015-11-08 11:58:30 EST
(In reply to Julien Enselme from comment #3)
> Hi,
Hi,
> 
> Before doing a full review of this package, I have some questions/remarks:
> 
> - I think the initial release tag is incorrect and should be
> 0.1.git%{shortcommit}%{?dist} instead of 0.0.git%{shortcommit}%{?dist} (so
> the current release tag should be 0.2.git%{shortcommit}%{?dist}) See
> https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages
> - Please add %license pydicom/license.txt to all subpackage to install the
> license file where it is expected to be.
ok, I will add license.txt to all subpkgs. Please do full review and if no other issues will found - I will do when will import to fedora infra.

Regarding version I don't think that there are problems, I will bump to 0.1.git...... once I will bump. It's initial package and I don't see any problems. Anyway if you want - I will do this when will import to fedora git.
> 
> - According to the license file, some part of the software are bundled with
> pydicom and distributed under a different license:
I unbundled all libraries.
> 
> > Portions of pydicom (private dictionary file(s)) were generated from the private dictionary of the GDCM library, released under the following license:
> 
> >  Program: GDCM (Grassroots DICOM). A DICOM library
> >  Module:  http://gdcm.sourceforge.net/Copyright.html
> 
> However, I don't know which files this relates to. Do you have more
> information on that?
GDCM itself licensed under BSD. Regarding licensing for those part, I will add also BSD to license list.

But please do full review first and if it's all, set fedora-review+ and I will add this when import.
Comment 5 Igor Gnatenko 2015-11-08 12:02:39 EST
But.

its just that he autogenerates some python dicts from GDCM thats under one of those "you have to include this notice that says CREATIS is not responsible for anything you do with this code"
Comment 6 Igor Gnatenko 2015-11-08 12:17:03 EST
i got few free mins:
New SRPM: https://ignatenkobrain.fedorapeople.org/neurofedora/python-pydicom-1.0.0-0.2.gitf6191c7.fc24.src.rpm
New SPEC: https://ignatenkobrain.fedorapeople.org/neurofedora/python-pydicom.spec

- Include license file
- Add BSD to license list (generated data) from GDCM
Comment 7 Julien Enselme 2015-11-08 13:00:09 EST
Almost good. See below my comment on the rpmlint error and on the incorrect provides.


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: "Unknown or generated". 177 files have unknown license.
     Detailed output of licensecheck in /tmp/1276837-python-
     pydicom/licensecheck.txt
[X]: License file installed when any subpackage combination is installed.
[X]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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 675840 bytes in 74 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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: 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
Please correct the rpmlint error: E: non-executable-script. You can use in %install:
sed -i '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitearch}/%{modname}/contrib/dicom_dao.py
sed -i '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitearch}/%{modname}/contrib/dicom_dao.py

[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

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

Generic:
[X]: Uses parallel make %{?_smp_mflags} macro.
make is used to build doc, the _smp_mflags is not needed in this case.

[-]: 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).
They should be:
python3-pydicom:
    python3-pydicom(x86-64)
    python3-pydicom

python2-pydicom:
    python-pydicom
    python-pydicom(x86-64)
    python2-pydicom(x86-64)
    python2-pydicom

It may come from the fact that in the python3 subpackage you used %{?python_provide:%python_provide python2-%{modname}} (notice the python2) instead of %{?python_provide:%python_provide python3-%{modname}}

[X]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-pydicom , python3-pydicom
[?]: Package functions as described.
[X]: Latest version is packaged.
[X]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[X]: %check is present and all tests pass.
[X]: Packages should try to preserve timestamps of original installed
     files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-pydicom-1.0.0-0.2.gitf6191c7.fc24.noarch.rpm
          python3-pydicom-1.0.0-0.2.gitf6191c7.fc24.noarch.rpm
          python-pydicom-1.0.0-0.2.gitf6191c7.fc24.src.rpm
python2-pydicom.noarch: W: spelling-error %description -l en_US pythonic -> Python, python
python2-pydicom.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/pydicom/contrib/dicom_dao.py 644 /usr/bin/python
python3-pydicom.noarch: W: spelling-error %description -l en_US pythonic -> Python, python
python3-pydicom.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/pydicom/contrib/dicom_dao.py 644 /usr/bin/python
python-pydicom.src: W: spelling-error %description -l en_US pythonic -> Python, python
3 packages and 0 specfiles checked; 2 errors, 3 warnings.




Rpmlint (installed packages)
----------------------------
python3-pydicom.noarch: E: non-executable-script /usr/lib/python3.4/site-packages/pydicom/contrib/dicom_dao.py 644 /usr/bin/python
python2-pydicom.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/pydicom/contrib/dicom_dao.py 644 /usr/bin/python
2 packages and 0 specfiles checked; 2 errors, 0 warnings.



Requires
--------
python3-pydicom (rpmlib, GLIBC filtered):
    python(abi)
    python3-dateutil

python2-pydicom (rpmlib, GLIBC filtered):
    python(abi)
    python-dateutil



Provides
--------
python3-pydicom:
    python-pydicom
    python-pydicom(x86-64)
    python3-pydicom

python2-pydicom:
    python-pydicom
    python-pydicom(x86-64)
    python2-pydicom



Source checksums
----------------
https://github.com/darcymason/pydicom/archive/f6191c7f67d44ac942a259821bc8f436c37005be/pydicom-f6191c7.tar.gz :
  CHECKSUM(SHA256) this package     : 56f9cebf196e086a9a40ace5f4c0d20248779ab1f9fadec99c453d5ef18fa877
  CHECKSUM(SHA256) upstream package : 56f9cebf196e086a9a40ace5f4c0d20248779ab1f9fadec99c453d5ef18fa877


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -b 1276837
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6
Comment 8 Igor Gnatenko 2015-11-08 13:01:37 EST
Many thanks for quick review. Will fix in few minutes.
Comment 9 Igor Gnatenko 2015-11-08 13:11:16 EST
New SRPM: https://ignatenkobrain.fedorapeople.org/neurofedora/python-pydicom-1.0.0-0.3.gitf6191c7.fc24.src.rpm
New SPEC: https://ignatenkobrain.fedorapeople.org/neurofedora/python-pydicom.spec

- Fix provide macro for py3 (typo)
- Remove shebang from dicom_dao.py (non-executable-script)
Comment 10 Julien Enselme 2015-11-08 13:36:18 EST
Looks good. Approved!
Comment 11 Gwyn Ciesla 2015-11-08 22:53:48 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/python-pydicom
Comment 12 Fedora Update System 2015-11-09 00:24:27 EST
python-pydicom-1.0.0-0.3.gitf6191c7.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2803c1bf3b
Comment 13 Fedora Update System 2015-11-09 22:23:12 EST
python-pydicom-1.0.0-0.3.gitf6191c7.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update python-pydicom'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-2803c1bf3b
Comment 14 Fedora Update System 2015-11-22 19:24:57 EST
python-pydicom-1.0.0-0.3.gitf6191c7.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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