Bug 2213169 - Review Request: python-jupyter-collaboration - JupyterLab Extension enabling Real-Time Collaboration
Summary: Review Request: python-jupyter-collaboration - JupyterLab Extension enabling ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karolina Surma
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-07 09:48 UTC by Lumír Balhar
Modified: 2023-06-28 13:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-27 09:24:11 UTC
Type: ---
Embargoed:
ksurma: fedora-review+


Attachments (Terms of Use)

Description Lumír Balhar 2023-06-07 09:48:09 UTC
Spec URL: https://lbalhar.fedorapeople.org/python-jupyter-collaboration.spec
SRPM URL: https://lbalhar.fedorapeople.org/python-jupyter-collaboration-1.0.0a9-3.fc38.src.rpm
Description: JupyterLab Real-Time Collaboration is a Jupyter Server Extension and JupyterLab extensions providing support for Y documents and adding collaboration UI
elements in JupyterLab.
Fedora Account System Username: lbalhar

Built and tested with updated version of python-jupyter-ydoc in https://copr.fedorainfracloud.org/coprs/lbalhar/python-jupyter-ydoc/

Comment 1 Miro Hrončok 2023-06-07 12:49:30 UTC
I've noticed one thing: The RPM version needs to be 1.0.0~a9 or else it will sort higher than 1.0.0 final.

Comment 2 Miro Hrončok 2023-06-07 12:54:38 UTC
# PACKAGE_VERSION is part of the remove_hatch-nodejs-version.patch
sed -i "s/PACKAGE_VERSION/%{version}/" pyproject.toml

Pro-tip: See the %writevars macro from https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros.fedora-misc 

tl;dr:

1) Use @@VERSION@@ in the patch
2) Replace the sed with %writevars -f pyproject.toml

Comment 3 Miro Hrončok 2023-06-07 13:20:16 UTC
(In reply to Miro Hrončok from comment #2)
> 2) Replace the sed with %writevars -f pyproject.toml

Actually with %writevars -f pyproject.toml version

Comment 4 Miro Hrončok 2023-06-07 13:22:50 UTC
(Using %writevars -f pyproject.toml version actually collides with ~ in %version, so it might be actually more complex than the sed.)

Comment 6 Miro Hrončok 2023-06-08 09:07:28 UTC
Issues:

remove_hatch-nodejs-version.patch has no comment in the specfile and no commit message either. In order to understand why it is needed, I must have read the diff and made assumptions.

See https://docs.fedoraproject.org/en-US/packaging-guidelines/PatchUpstreamStatus/#_all_patches_should_have_an_upstream_bug_link_or_comment



python-jupyter-collaboration.spec:17: W: mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 17)

(The tab is just trailing and should be removed.)




python3-jupyter-collaboration.noarch: E: backup-file-in-package /usr/share/jupyter/labextensions/@jupyter/collaboration-extension/schemas/@jupyter/collaboration-extension/package.json.orig

(I don't say this is a blocker but might be a good idea to fix that upsream?)




License:    BSD-3-Clause -> BSD-3-Clause AND MIT:
jupyter_collaboration/labextension/static/third-party-licenses.json is MIT
packages/collaboration/src/cursors.ts is BSD 3-Clause AND MIT
/usr/share/jupyter/labextensions/@jupyter/collaboration-extension/static/third-party-licenses.json also mentions a couple bundled libraries (not provided from the spec) licensed as MIT

Comment 7 Lumír Balhar 2023-06-12 14:58:18 UTC
I've updated the package to 1.0.0 final and fixed all the mentioned issues.

Spec URL: https://lbalhar.fedorapeople.org/python-jupyter-collaboration.spec
SRPM URL: https://lbalhar.fedorapeople.org/python-jupyter-collaboration-1.0.0-1.fc38.src.rpm

Comment 8 Miro Hrončok 2023-06-14 12:47:16 UTC
I might not be able to finish this before I leave for vacation in 2 days, so I am unassigning myself not to block others.

Comment 9 Karolina Surma 2023-06-15 12:09:35 UTC
This package should require python-jupyter-filesystem - same as all the other ones which place configs in %{_sysconfdir}/jupyter/jupyter_server_config.d/

Comment 10 Karolina Surma 2023-06-19 13:47:41 UTC
from fedora-review
[ ]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/jupyter/labextensions/@jupyter
[ ]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /usr/share/jupyter/labextensions/@jupyter

/usr/share/jupyter/labextensions/ is owned by python-jupyter-filesystem too.

Not a blocker: you don't need to have the explicit license file declared, it's picked up automatically:
$ rpm -qL python3-jupyter-collaboration-1.0.0-1.fc39.noarch.rpm                                         
/usr/lib/python3.11/site-packages/jupyter_collaboration-1.0.0.dist-info/licenses/LICENSE
/usr/share/licenses/python3-jupyter-collaboration/LICENSE

Comment 11 Lumír Balhar 2023-06-20 13:18:16 UTC
Thank you for the review. Requirements and the license fixed.

Spec URL: https://lbalhar.fedorapeople.org/python-jupyter-collaboration.spec
SRPM URL: https://lbalhar.fedorapeople.org/python-jupyter-collaboration-1.0.0-1.fc38.src.rpm

Comment 12 Karolina Surma 2023-06-21 08:05:18 UTC
Even in the latest version fedora-review detects an unowned directory: /usr/share/jupyter/labextensions/@jupyter

Comment 13 Karolina Surma 2023-06-21 08:06:33 UTC
Can this be mitigated by changing in %files:
%{_datadir}/jupyter/labextensions/@jupyter/collaboration-extension
to
%{_datadir}/jupyter/labextensions/@jupyter
?

Comment 14 Lumír Balhar 2023-06-21 08:26:10 UTC
I'm thinking about it and it might make sense to add this folder to python-jupyter-filesystem so this folder can be shared by multiple extensions in the future. What do you think about this idea?

Comment 15 Karolina Surma 2023-06-21 09:04:11 UTC
This makes sense to me, the directory name doesn't contain elements unique for this package and it might happen it'll be reused by other Jupyter components.

Comment 16 Lumír Balhar 2023-06-22 07:09:44 UTC
PR for python-jupyter-core (origin of python-jupyter-filesystem): https://src.fedoraproject.org/rpms/python-jupyter-core/pull-request/16

Comment 17 Karolina Surma 2023-06-22 13:48:28 UTC
I used the updated python-jupyter-core to build the package again, now the ownership is fixed:
%{_datadir}/jupyter/labextensions/@jupyter - owned by python-jupyter-filesystem
%{_datadir}/jupyter/labextensions/@jupyter/collaboration-extension - owned by python3-jupyter-collaboration

Package APPROVED. Please build it only with/after https://src.fedoraproject.org/rpms/python-jupyter-core/pull-request/16 is available


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", "BSD 3-Clause License", "*No copyright*
     BSD 3-Clause License", "*No copyright* [generated file]", "MIT
     License", "MIT License BSD 3-Clause License". 47 files have unknown
     license. Detailed output of licensecheck in
     /home/ksurma/tmp/2213169-python-jupyter-collaboration/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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: No rpmlint messages.
[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]: %config files are marked noreplace or the reason is justified.
[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]: No %config files under /usr.
[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.
[-]: 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).
[x]: 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.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: 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: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.

Comment 18 Fedora Update System 2023-06-27 09:17:57 UTC
FEDORA-2023-b051d09ef4 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b051d09ef4

Comment 19 Fedora Update System 2023-06-27 09:24:11 UTC
FEDORA-2023-b051d09ef4 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Fedora Admin user for bugzilla script actions 2023-06-28 12:55:43 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-jupyter-collaboration


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