Bug 1758036 - Review Request: sentencepiece - unsupervised text tokenizer for Neural Network-based text generation
Summary: Review Request: sentencepiece - unsupervised text tokenizer for Neural Networ...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-03 05:23 UTC by Kentaro Hayashi
Modified: 2019-10-11 01:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Kentaro Hayashi 2019-10-03 05:23:53 UTC
Spec URL: https://packages.groonga.org/tmp/sentencepiece.spec
SRPM URL: https://packages.groonga.org/tmp/sentencepiece-0.1.83-1.fc30.src.rpm
Description: unsupervised text tokenizer for Neural Network-based text generation
Fedora Account System Username: kenhys



$ rpmlint -i *.rpm
python3-sentencepiece.x86_64: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

sentencepiece-devel.x86_64: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

sentencepiece-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libsentencepiece.so.0.0.0 exit@GLIBC_2.2.5
This library package calls exit() or _exit(), probably in a non-fork()
context. Doing so from a library is strongly discouraged - when a library
function calls exit(), it prevents the calling program from handling the
error, reporting it to the user, closing files properly, and cleaning up any
state that the program has. It is preferred for the library to return an
actual error code and let the calling program decide how to handle the
situation.

sentencepiece-tools.x86_64: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_decode
Each executable in standard binary directories should have a man page.

sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_encode
Each executable in standard binary directories should have a man page.

sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_export_vocab
Each executable in standard binary directories should have a man page.

sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_normalize
Each executable in standard binary directories should have a man page.

sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_train
Each executable in standard binary directories should have a man page.

9 packages and 0 specfiles checked; 0 errors, 9 warnings.

Comment 1 Robert-André Mauchin 2019-10-06 17:42:30 UTC
 - Group: is not used in Fedorba

 - Not used since Fedora 28:

Requires(post):	/sbin/ldconfig
Requires(postun):	/sbin/ldconfig

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig

- Not needed:

%defattr(-,root,root,-)

 - make %{?_smp_mflags} → %make_build

 - make install → %make_install

 - find %{buildroot} -name '*.a' | xargs rm -f {}\; → find %{buildroot} -name '*.a' -delete

 - Not needed:

%clean

 - You must install the license file with %license not %doc

%files libs
%doc README.md
%license LICENSE

 - You must include the python provide macros for your Python package:

%package        -n python3-%{name}
Summary:	Python module for SentencePiece
%{?python_provide:%python_provide python3-%{name}}

See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro

 - -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr → -DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix}


You are already a member of the packager group, thus you don't need a sponsor.

Comment 2 Robert-André Mauchin 2019-10-06 17:45:02 UTC
 - Also not ok:

Provides: python3dist(sentencepiece)

 The python3dist macro is computed automatically for you Py3 subpackage.

Comment 3 Robert-André Mauchin 2019-10-06 17:57:05 UTC
 - In order to avoid unintentional soname bump we forbud globbing the major soname version, be more specific instead:

%{_libdir}/*.so.*

 - Add dots at the end of your description sentences.

Comment 4 Kentaro Hayashi 2019-10-07 06:01:23 UTC
Spec URL: https://packages.groonga.org/tmp/sentencepiece/sentencepiece.spec
SRPM URL: https://packages.groonga.org/tmp/sentencepiece/sentencepiece-0.1.83-1.fc30.src.rpm
Description: unsupervised text tokenizer for Neural Network-based text generation

Thank you for review I've fixed spec with feedback comments.

https://bugzilla.redhat.com/show_bug.cgi?id=1758036#c1
https://bugzilla.redhat.com/show_bug.cgi?id=1758036#c2
https://bugzilla.redhat.com/show_bug.cgi?id=1758036#c3

Here is the summary for updates.

* Removed unused Group
* Removed unused ldconfig scriptlet
* Removed needless %defattr, %clean
* Used %make_install, %make_build, %license
* Used %python_provide
* Fixed /usr to %{_prefix}
* Fixed to use -delete in find
* Fixed to unintentional soname bump (less globbing in %files)
* Fixed %description, add missing . in end of sentences

Comment 5 Robert-André Mauchin 2019-10-07 15:29:51 UTC
 - You must include the python provide macros *for your Python package*:

%package        -n python3-%{name}
Summary:	Python module for SentencePiece
%{?python_provide:%python_provide python3-%{name}}

See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro

You should not include it in the main package.

 - Also use Fedora build flags:: cmake3 . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir} → %cmake3 . -DCMAKE_INSTALL_LIBDIR=%{_libdir}



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

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


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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", "Apache License (v2.0)", "*No
     copyright* Apache License (v2.0)", "BSD 3-clause "New" or "Revised"
     License", "Expat License". 61 files have unknown license. Detailed
     output of licensecheck in
     /home/bob/packaging/review/sentencepiece/review-
     sentencepiece/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: %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.
[x]: 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 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]: 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
[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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     sentencepiece-libs , sentencepiece-tools , sentencepiece-devel ,
     python3-sentencepiece
[?]: Package functions as described.
[x]: 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.
[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]: The placement of pkgconfig(.pc) files are correct.
[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 debuginfo package(s).
     Note: No rpmlint messages.
[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: sentencepiece-libs-0.1.83-1.fc32.x86_64.rpm
          sentencepiece-tools-0.1.83-1.fc32.x86_64.rpm
          sentencepiece-devel-0.1.83-1.fc32.x86_64.rpm
          python3-sentencepiece-0.1.83-1.fc32.x86_64.rpm
          sentencepiece-debuginfo-0.1.83-1.fc32.x86_64.rpm
          sentencepiece-debugsource-0.1.83-1.fc32.x86_64.rpm
          sentencepiece-0.1.83-1.fc32.src.rpm
sentencepiece-libs.x86_64: W: shared-lib-calls-exit /usr/lib64/libsentencepiece.so.0.0.0 exit@GLIBC_2.2.5
sentencepiece-tools.x86_64: W: no-documentation
sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_decode
sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_encode
sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_export_vocab
sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_normalize
sentencepiece-tools.x86_64: W: no-manual-page-for-binary spm_train
sentencepiece-devel.x86_64: W: no-documentation
python3-sentencepiece.x86_64: W: no-documentation
sentencepiece.src: W: spelling-error Summary(en_US) tokenizer -> tokenism
sentencepiece.src: W: spelling-error %description -l en_US tokenizer -> tokenism
sentencepiece.src: W: spelling-error %description -l en_US detokenizer -> tenderizer
sentencepiece.src: W: spelling-error %description -l en_US subword -> sub word, sub-word, suborder
sentencepiece.src: W: spelling-error %description -l en_US unigram -> uni gram, uni-gram, centigram
sentencepiece.src: W: spelling-error %description -l en_US pre -> per, ore, pee
7 packages and 0 specfiles checked; 0 errors, 15 warnings.

Comment 6 Kentaro Hayashi 2019-10-09 03:07:56 UTC
Thank you for reviewing.


I've updated spec.

Spec URL: https://packages.groonga.org/tmp/sentencepiece/sentencepiece.spec
SRPM URL: https://packages.groonga.org/tmp/sentencepiece/sentencepiece-0.1.83-1.fc30.src.rpm
Description: unsupervised text tokenizer for Neural Network-based text generation


(In reply to Robert-André Mauchin from comment #5)
>  - You must include the python provide macros *for your Python package*:
> 
> %package        -n python3-%{name}
> Summary:	Python module for SentencePiece
> %{?python_provide:%python_provide python3-%{name}}
> 
> See
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_the_python_provide_macro
> 

I've fixed to define macro correctly.

> You should not include it in the main package.
> 
>  - Also use Fedora build flags:: cmake3 . -DCMAKE_INSTALL_PREFIX=%{_prefix}
> -DCMAKE_INSTALL_LIBDIR=%{_libdir} → %cmake3 .
> -DCMAKE_INSTALL_LIBDIR=%{_libdir}


I've fixed to use %cmake macro instead.


* Fixed to

Comment 7 Robert-André Mauchin 2019-10-09 16:31:05 UTC
LGTM, package approved.

Comment 8 Kentaro Hayashi 2019-10-10 00:04:38 UTC
Because of sentence piece package is approved, I've tried to request fedpkg request-repo [1], but it was failed.

Here is the error log:

$ fedpkg request-repo sentencepiece 1758036
Could not execute request_repo: The following error occurred while creating a new issue in Pagure: Invalid or expired token. Please visit https://pagure.io/settings#nav-api-tab to get or renew your API token.
For invalid or expired token refer to "fedpkg request-repo -h" to set a token in your user configuration.

Before requesting fedpkg request-repo, I've set up ~/config/rpkg/fedpkg.conf (fedpkg request-repo -h explains about pague API token)
Even though full ACLs are checked (Fork a project,Modify an existing project,Comment on a pull-request,Open a new pull-request,Merge a pull-request,Update the watch status on a project), fedpkg request-repo fails.

What am I missing to do next steps?

[1] https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Add_Package_to_Source_Code_Management_.28SCM.29_system_and_Set_Owner

Comment 9 Robert-André Mauchin 2019-10-10 13:50:12 UTC
I don't know tbh, please ask on the devel mailing list about your error. Please double-check the API key? Did you correctly go to https://pagure.io/settings#nav-api-tab and not src.fedoraproject.org ?

Comment 10 Gwyn Ciesla 2019-10-11 01:06:06 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/sentencepiece

Comment 11 Kentaro Hayashi 2019-10-11 01:52:35 UTC
(In reply to Robert-André Mauchin from comment #9)
> I don't know tbh, please ask on the devel mailing list about your error.
> Please double-check the API key? Did you correctly go to
> https://pagure.io/settings#nav-api-tab and not src.fedoraproject.org ?

Thanks, that's it! It's a API key issue.(It's my mistake)


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