Bug 1826950 (python-jsonfield) - Review Request: python-jsonfield - is a reusable model field that allows you to store validated JSON, automatically handling serialization to and from the database.
Summary: Review Request: python-jsonfield - is a reusable model field that allows you ...
Keywords:
Status: CLOSED ERRATA
Alias: python-jsonfield
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1799928 1810731
TreeView+ depends on / blocked
 
Reported: 2020-04-22 20:24 UTC by Luis Bazan
Modified: 2020-05-06 04:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-06 03:07:34 UTC
Type: Bug
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Luis Bazan 2020-04-22 20:24:05 UTC
Description:
is a reusable model field that allows you to store validated JSON, automatically handling serialization to and from the database.

SPEC:https://lbazan.fedorapeople.org/python-django-jsonfield.spec
SRPM:https://lbazan.fedorapeople.org/python-django-jsonfield-3.1.0-1.fc32.src.rpm

Koji:
https://koji.fedoraproject.org/koji/taskinfo?taskID=43655907

koji build --scratch rawhide python-django-jsonfield-3.1.0-1.fc32.src.rpm 
Uploading srpm: python-django-jsonfield-3.1.0-1.fc32.src.rpm
[====================================] 100% 00:00:00  21.75 KiB  53.13 KiB/sec
Created task: 43655907
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=43655907
Watching tasks (this may be safely interrupted)...
43655907 build (rawhide, python-django-jsonfield-3.1.0-1.fc32.src.rpm): free
43655907 build (rawhide, python-django-jsonfield-3.1.0-1.fc32.src.rpm): free -> open (buildvm-armv7-20.arm.fedoraproject.org)
  43655912 rebuildSRPM (noarch): open (buildvm-armv7-07.arm.fedoraproject.org)
  43655980 buildArch (python-django-jsonfield-3.1.0-1.fc33.src.rpm, noarch): free
  43655912 rebuildSRPM (noarch): open (buildvm-armv7-07.arm.fedoraproject.org) -> closed
  1 free  1 open  1 done  0 failed
  43655980 buildArch (python-django-jsonfield-3.1.0-1.fc33.src.rpm, noarch): free -> open (buildvm-19.phx2.fedoraproject.org)
  43655980 buildArch (python-django-jsonfield-3.1.0-1.fc33.src.rpm, noarch): open (buildvm-19.phx2.fedoraproject.org) -> closed
  0 free  1 open  2 done  0 failed
43655907 build (rawhide, python-django-jsonfield-3.1.0-1.fc32.src.rpm): open (buildvm-armv7-20.arm.fedoraproject.org) -> closed
  0 free  0 open  3 done  0 failed

43655907 build (rawhide, python-django-jsonfield-3.1.0-1.fc32.src.rpm) completed successfully

Comment 1 Luis Bazan 2020-04-22 20:25:01 UTC
This re-review is to unretire this package:
https://pagure.io/releng/issue/9287

Cheers,

Comment 2 Miro Hrončok 2020-04-22 21:49:06 UTC
Spec sanity:

Source0:        https://files.pythonhosted.org/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

Please, use  %pypi_source, https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_source_files_from_pypi


BuildRequires:	python3-tox
BuildRequires:	python3-coverage

There is no %check, why does the package need tox and coverage?



Requires:  python3-django            
Requires:  python3-django-formtools 

The following requirement is generated automatically, please drop the explicit one:

python3.8dist(django) >= 2.2

The package does not seem to need formtools, https://github.com/rpkilby/jsonfield/search?q=formtools&unscoped_q=formtools yields nothing. Please drop the (buil)requires or prove me wrong.



%{python3_sitelib}/* is forbidden (well, discouraged), see https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_files_to_include



* Mon Apr 24 2020 Luis Bazan <lbazan> - 3.1.0-1
- Rebuild  


This entry doesn't make much sense.

Comment 3 Luis Bazan 2020-04-22 21:51:30 UTC
Ups my mistake!

thanks Miro --

Working on it!

Cheers,

Comment 4 Miro Hrončok 2020-04-22 21:57:26 UTC
No problemo ;)

Comment 5 Luis Bazan 2020-04-22 22:01:29 UTC
Hi Miro --

Source Fixed
changelog Fixed
sitelib Fixed
djangoversion Fixed
tox/coverage droped Fixed
formtools fixed

SPEC:https://lbazan.fedorapeople.org/python-django-jsonfield.spec
SRPM:https://lbazan.fedorapeople.org/python-django-jsonfield-3.1.0-1.fc32.src.rpm

Comment 6 Luis Bazan 2020-04-22 22:01:50 UTC
License change to MIT Fixed

Cheers,

Comment 7 Miro Hrončok 2020-04-22 22:10:26 UTC
This is wrong:

BuildRequires:  python3.8dist(django) >= 2.2 

(For example it will break on Fedora 31 or when we update Python to 3.9.)


Please keep buildrequiring Python version agnostic python3-django. The "python3.8dist(django)" dependency is generated for runtime (automatically from upstream metadata).

Comment 8 Miro Hrončok 2020-04-22 22:11:51 UTC
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info


I suggest to replace this with:

%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/

This ensures:

 - future compatibility with Python 3.10
 - the build will fail if the path is accidentally not a directory

Comment 9 Luis Bazan 2020-04-22 22:16:54 UTC
:-)

Buildrequires Fixed
Suggestions applied.

Cheers,

Comment 11 Miro Hrončok 2020-04-22 23:59:03 UTC
There is  lot of trailing whitespace, consider trimming it.




The source is different than in the source url:

https://files.pythonhosted.org/packages/source/j/jsonfield/jsonfield-3.1.0.tar.gz :
  CHECKSUM(SHA256) this package     : 83830542a6fcd517cb362a20239c9305a38295319b0476d79ec05b918bca1fad
  CHECKSUM(SHA256) upstream package : 7e4e84597de21eeaeeaaa7cc5da08c61c48a9b64d0c446b2d71255d01812887a
diff -r also reports differences




Please, run the upstream testsuite in %check:

%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %{python3} manage.py test

Comment 12 Miro Hrončok 2020-04-23 00:01:30 UTC
According to the guidelines, the package name should be python-jsonfield / python3-jsonfield, not python-django-jsonfield / python3-django-jsonfield.

It might obsolete/provide python3-django-jsonfield to provide na upgrade path.

Comment 13 Luis Bazan 2020-04-23 03:23:10 UTC
Hi Miro --

Renamed Fixed
Test added Fixed
whitespace Fixed
Source Fixed

SPEC:https://lbazan.fedorapeople.org/python-jsonfield.spec
SRPM:https://lbazan.fedorapeople.org/python-jsonfield-3.1.0-1.fc32.src.rpm

koji build --scratch rawhide python-jsonfield-3.1.0-1.fc32.src.rpm 
Uploading srpm: python-jsonfield-3.1.0-1.fc32.src.rpm
[====================================] 100% 00:00:00  21.63 KiB  52.99 KiB/sec
Created task: 43670083
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=43670083
Watching tasks (this may be safely interrupted)...
43670083 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm): free
43670083 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm): free -> open (buildvm-armv7-24.arm.fedoraproject.org)
  43670085 rebuildSRPM (noarch): free
  43670085 rebuildSRPM (noarch): free -> open (buildvm-armv7-17.arm.fedoraproject.org)
  43670085 rebuildSRPM (noarch): open (buildvm-armv7-17.arm.fedoraproject.org) -> closed
  0 free  1 open  1 done  0 failed
  43670169 buildArch (python-jsonfield-3.1.0-1.fc33.src.rpm, noarch): free
  43670169 buildArch (python-jsonfield-3.1.0-1.fc33.src.rpm, noarch): free -> open (buildvm-armv7-13.arm.fedoraproject.org)
  43670169 buildArch (python-jsonfield-3.1.0-1.fc33.src.rpm, noarch): open (buildvm-armv7-13.arm.fedoraproject.org) -> closed
  0 free  1 open  2 done  0 failed
43670083 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm): open (buildvm-armv7-24.arm.fedoraproject.org) -> closed
  0 free  0 open  3 done  0 failed

43670083 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm) completed successfully

Cheers,

Comment 14 Miro Hrončok 2020-04-23 10:19:10 UTC
The description does not reflect the package rename.

The source tarball is still not the same as in the URL:

Source checksums
----------------
https://files.pythonhosted.org/packages/source/j/jsonfield/jsonfield-3.1.0.tar.gz :
  CHECKSUM(SHA256) this package     : 83830542a6fcd517cb362a20239c9305a38295319b0476d79ec05b918bca1fad
  CHECKSUM(SHA256) upstream package : 7e4e84597de21eeaeeaaa7cc5da08c61c48a9b64d0c446b2d71255d01812887a
diff -r also reports differences


The spec still has plenty of trailing whitespace and mixes tabs and spaces.


From rpmlint:
python-jsonfield.src:23: W: mixed-use-of-spaces-and-tabs (spaces: line 3, tab: line 23)
python-jsonfield.src: W: file-size-mismatch jsonfield-3.1.0.tar.gz = 14813, https://files.pythonhosted.org/packages/source/j/jsonfield/jsonfield-3.1.0.tar.gz = 14870

Comment 15 Luis Bazan 2020-04-23 14:11:58 UTC
Hi Miro 

Working on it!

Cheers,

Comment 16 Luis Bazan 2020-04-23 21:01:48 UTC
SPEC:https://lbazan.fedorapeople.org/python-jsonfield.spec
SRPM:https://lbazan.fedorapeople.org/python-jsonfield-3.1.0-1.fc32.src.rpm

rpmlint python-jsonfield.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

rpmlint python-jsonfield-3.1.0-1.fc32.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

Comment 17 Luis Bazan 2020-04-23 21:03:05 UTC
Hi Miro

Description fixed
whitespace fixed
source fixed

Cheers,

Comment 18 Luis Bazan 2020-04-23 21:05:35 UTC
koji build --scratch rawhide python-jsonfield-3.1.0-1.fc32.src.rpm 
Uploading srpm: python-jsonfield-3.1.0-1.fc32.src.rpm
[====================================] 100% 00:00:00  21.63 KiB  52.81 KiB/sec
Created task: 43699551
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=43699551
Watching tasks (this may be safely interrupted)...
43699551 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm): free
43699551 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm): free -> open (buildvm-armv7-11.arm.fedoraproject.org)
  43699552 rebuildSRPM (noarch): open (buildvm-03.phx2.fedoraproject.org)
  43699552 rebuildSRPM (noarch): open (buildvm-03.phx2.fedoraproject.org) -> closed
  0 free  1 open  1 done  0 failed
  43699553 buildArch (python-jsonfield-3.1.0-1.fc33.src.rpm, noarch): open (buildvm-armv7-11.arm.fedoraproject.org)
  43699553 buildArch (python-jsonfield-3.1.0-1.fc33.src.rpm, noarch): open (buildvm-armv7-11.arm.fedoraproject.org) -> closed
  0 free  1 open  2 done  0 failed
43699551 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm): open (buildvm-armv7-11.arm.fedoraproject.org) -> closed
  0 free  0 open  3 done  0 failed

43699551 build (rawhide, python-jsonfield-3.1.0-1.fc32.src.rpm) completed successfully

Comment 19 Miro Hrončok 2020-04-26 13:24:53 UTC
Package Review
==============

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


Package APPROVED.

There is still some amount of useless trailing whitespace, but that is not a blocker.


===== 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", "Expat License".
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 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]: 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.
[?]: 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.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[?]: 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-jsonfield-3.1.0-1.fc33.noarch.rpm
          python-jsonfield-3.1.0-1.fc33.src.rpm
python3-jsonfield.noarch: E: useless-provides python-jsonfield
python3-jsonfield.noarch: E: useless-provides python38-jsonfield
2 packages and 0 specfiles checked; 2 errors, 0 warnings.

If you target other versions than rawhide, ignore the useless-provides error.



Rpmlint (installed packages)
----------------------------
python3-jsonfield.noarch: E: useless-provides python-jsonfield
python3-jsonfield.noarch: E: useless-provides python38-jsonfield
1 packages and 0 specfiles checked; 2 errors, 0 warnings.



Source checksums
----------------
https://github.com/rpkilby/jsonfield/archive/3.1.0/jsonfield-3.1.0.tar.gz :
  CHECKSUM(SHA256) this package     : 83830542a6fcd517cb362a20239c9305a38295319b0476d79ec05b918bca1fad
  CHECKSUM(SHA256) upstream package : 83830542a6fcd517cb362a20239c9305a38295319b0476d79ec05b918bca1fad


Requires
--------
python3-jsonfield (rpmlib, GLIBC filtered):
    python(abi)
    python3.8dist(django)



Provides
--------
python3-jsonfield:
    python-jsonfield
    python3-jsonfield
    python3.8dist(jsonfield)
    python38-jsonfield
    python3dist(jsonfield)



Generated by fedora-review 0.7.0 (fed5495) last change: 2019-03-17
Command line :try-fedora-review -b 1826950 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: fonts, Java, Ruby, Haskell, SugarActivity, PHP, Ocaml, R, Perl, C/C++
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 20 Gwyn Ciesla 2020-04-26 18:25:24 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-jsonfield

Comment 21 Fedora Update System 2020-04-27 16:05:39 UTC
FEDORA-2020-120aea1636 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-120aea1636

Comment 22 Fedora Update System 2020-04-27 16:05:40 UTC
FEDORA-2020-28f36b7cca has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-28f36b7cca

Comment 23 Fedora Update System 2020-04-28 03:23:57 UTC
FEDORA-2020-28f36b7cca has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-28f36b7cca`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-28f36b7cca

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

Comment 24 Fedora Update System 2020-04-28 03:52:10 UTC
FEDORA-2020-120aea1636 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-120aea1636`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-120aea1636

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

Comment 25 Fedora Update System 2020-05-06 03:07:34 UTC
FEDORA-2020-120aea1636 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2020-05-06 04:29:47 UTC
FEDORA-2020-28f36b7cca has been pushed to the Fedora 32 stable repository.
If problem still persists, 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.