Bug 1553835 - Review Request: utop - Improved toplevel for OCaml
Summary: Review Request: utop - Improved toplevel for OCaml
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Rosser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-09 16:29 UTC by Sergey Avseyev
Modified: 2018-03-16 15:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-16 15:49:18 UTC
Type: ---
Embargoed:
rosser.bjr: fedora-review+


Attachments (Terms of Use)

Description Sergey Avseyev 2018-03-09 16:29:44 UTC
Spec URL: https://avsej.fedorapeople.org/ocaml-utop/0/ocaml-utop.spec
SRPM URL: https://avsej.fedorapeople.org/ocaml-utop/0/ocaml-utop-2.1.0-1.fc29.src.rpm
Fedora Account System Username: avsej
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=25584105
Description:
utop is an improved toplevel (i.e., Read-Eval-Print Loop) for
OCaml. It can run in a terminal or in Emacs. It supports line
editing, history, real-time and context sensitive completion,
colors, and more.

Comment 2 Ben Rosser 2018-03-09 17:43:31 UTC
Hi Sergey,

I was planning to submit a review ticket for this but hadn't gotten to it. I'm happy to review it for you. :)

A few immediate thoughts:

1) It may just be personal preference, but I would suggest Providing "utop", as this is both a library and application package. (I was going to name the package "utop" and provide ocaml-utop).

2) If you BuildRequires: opam-installer, you can use the following to install:

export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
jbuilder install --prefix %{buildroot}%{_prefix}

This doesn't *completely* do the right thing; I've found that it puts man pages in the wrong place, for instance. But it's a bit better than manually copying over all the files.

3) You likely need to Require emacs-filesystem, as I believe  {_emacs_sitelispdir} will otherwise not be owned.

Comment 3 Sergey Avseyev 2018-03-09 17:47:43 UTC
Thanks for the notes, I will fix and update SRPM.

Comment 4 Sergey Avseyev 2018-03-09 18:35:18 UTC
I've renamed package and applied other notes:

Spec URL: https://avsej.fedorapeople.org/utop/0/utop.spec
SRPM URL: https://avsej.fedorapeople.org/utop/0/utop-2.1.0-1.fc29.src.rpm
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=25585813

Comment 5 Ben Rosser 2018-03-15 22:32:35 UTC
Great!

Just two things; otherwise the package looks fine:

> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop.mli
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_complete.mli
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_history.mli
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_lexer.mli
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_main.mli
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_private.ml
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_styles.mli
> utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_token.ml

I wasn't sure about this when I was looking at utop myself. Does utop depend on these include files to function? Or should they be moved off into a -devel package?

Also from rpmlint:

> utop.src:21: W: unversioned-explicit-provides ocaml-%{name}

I don't think there is any harm in making this versioned, to make rpmlint slightly happier.

Comment 6 Sergey Avseyev 2018-03-16 07:56:40 UTC
I agree, and I checked that *.mli files are not necessary for utop to run. I moved them into -devel and put versions on Provides tags.

Spec URL: https://avsej.fedorapeople.org/utop/1/utop.spec
SRPM URL: https://avsej.fedorapeople.org/utop/1/utop-2.1.0-1.fc29.src.rpm
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=25737349

Comment 7 Ben Rosser 2018-03-16 15:04:56 UTC
Great!

Package is approved.

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: "BSD (2 clause)", "Unknown or generated". 38 files have unknown
     license. Detailed output of licensecheck in
     /home/bjr/Programming/fedora/reviews/1553835-utop/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %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.
[-]: 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 40960 bytes in 4 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

===== 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).
[?]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in utop-
     devel

     I think this is a false positive, as the dependency is definitely there in
     the spec and rpm -qpR confirms it. So, you can ignore this.

[x]: 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]: 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: utop-2.1.0-1.fc29.x86_64.rpm
          utop-devel-2.1.0-1.fc29.x86_64.rpm
          utop-2.1.0-1.fc29.src.rpm
utop.x86_64: W: spelling-error Summary(en_US) toplevel -> top level, top-level, topple
utop.x86_64: W: spelling-error %description -l en_US toplevel -> top level, top-level, topple
utop.x86_64: E: no-binary
utop.x86_64: W: only-non-binary-in-usr-lib
utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_private.ml
utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_token.ml
utop.x86_64: W: ocaml-naming-policy-not-applied /usr/lib64/ocaml/utop
utop-devel.x86_64: W: only-non-binary-in-usr-lib
utop-devel.x86_64: W: ocaml-naming-policy-not-applied /usr/lib64/ocaml/utop/uTop.mli
utop.src: W: spelling-error Summary(en_US) toplevel -> top level, top-level, topple
utop.src: W: spelling-error %description -l en_US toplevel -> top level, top-level, topple
3 packages and 0 specfiles checked; 1 errors, 10 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
utop-devel.x86_64: W: invalid-url URL: https://github.com/diml/utop <urlopen error [Errno -2] Name or service not known>
utop-devel.x86_64: W: only-non-binary-in-usr-lib
utop-devel.x86_64: W: ocaml-naming-policy-not-applied /usr/lib64/ocaml/utop/uTop.mli
utop.x86_64: W: spelling-error Summary(en_US) toplevel -> top level, top-level, topple
utop.x86_64: W: spelling-error %description -l en_US toplevel -> top level, top-level, topple
utop.x86_64: W: invalid-url URL: https://github.com/diml/utop <urlopen error [Errno -2] Name or service not known>
utop.x86_64: E: no-binary
utop.x86_64: W: only-non-binary-in-usr-lib
utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_private.ml
utop.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ocaml/utop/uTop_token.ml
utop.x86_64: W: ocaml-naming-policy-not-applied /usr/lib64/ocaml/utop
2 packages and 0 specfiles checked; 1 errors, 10 warnings.



Requires
--------
utop-devel (rpmlib, GLIBC filtered):
    utop(x86-64)

utop (rpmlib, GLIBC filtered):
    /usr/bin/ocamlrun
    emacs-filesystem
    ocaml(Arg)
    ocaml(Array)
    ocaml(ArrayLabels)
    ocaml(Ast_helper)
    ocaml(AvlTree)
    ocaml(Bigarray)
    ocaml(Btype)
    ocaml(Buffer)
    ocaml(Bytes)
    ocaml(CamlinternalBigarray)
    ocaml(CamlinternalFormatBasics)
    ocaml(CamlinternalLazy)
    ocaml(CamlinternalOO)
    ocaml(CamomileLibrary)
    ocaml(CamomileLibraryDyn)
    ocaml(Clflags)
    ocaml(Cmi_format)
    ocaml(Cmt_format)
    ocaml(Complex)
    ocaml(Config)
    ocaml(Consistbl)
    ocaml(Ctype)
    ocaml(Digest)
    ocaml(Docstrings)
    ocaml(Env)
    ocaml(Envaux)
    ocaml(Errors)
    ocaml(Filename)
    ocaml(Findlib)
    ocaml(Fl_metascanner)
    ocaml(Fl_metatoken)
    ocaml(Fl_package_base)
    ocaml(Format)
    ocaml(Hashtbl)
    ocaml(IMap)
    ocaml(ISet)
    ocaml(Ident)
    ocaml(Identifiable)
    ocaml(Includecore)
    ocaml(Includemod)
    ocaml(Int32)
    ocaml(LTerm)
    ocaml(LTerm_draw)
    ocaml(LTerm_edit)
    ocaml(LTerm_event)
    ocaml(LTerm_geom)
    ocaml(LTerm_history)
    ocaml(LTerm_inputrc)
    ocaml(LTerm_key)
    ocaml(LTerm_mouse)
    ocaml(LTerm_read_line)
    ocaml(LTerm_resources)
    ocaml(LTerm_style)
    ocaml(LTerm_text)
    ocaml(LTerm_widget)
    ocaml(LTerm_widget_callbacks)
    ocaml(Lazy)
    ocaml(Lexer)
    ocaml(Lexing)
    ocaml(List)
    ocaml(Location)
    ocaml(Longident)
    ocaml(Lwt)
    ocaml(Lwt_bytes)
    ocaml(Lwt_io)
    ocaml(Lwt_log)
    ocaml(Lwt_log_core)
    ocaml(Lwt_main)
    ocaml(Lwt_react)
    ocaml(Lwt_sequence)
    ocaml(Lwt_stream)
    ocaml(Lwt_sys)
    ocaml(Lwt_unix)
    ocaml(Map)
    ocaml(Marshal)
    ocaml(Misc)
    ocaml(Mutex)
    ocaml(Obj)
    ocaml(Parse)
    ocaml(Parser)
    ocaml(Parsing)
    ocaml(Path)
    ocaml(Pervasives)
    ocaml(Pparse)
    ocaml(Pprintast)
    ocaml(Primitive)
    ocaml(Printast)
    ocaml(Printexc)
    ocaml(Printf)
    ocaml(Printtyp)
    ocaml(Profile)
    ocaml(React)
    ocaml(Scanf)
    ocaml(Set)
    ocaml(Stream)
    ocaml(String)
    ocaml(Subst)
    ocaml(Syntaxerr)
    ocaml(Sys)
    ocaml(Thread)
    ocaml(Topdirs)
    ocaml(Topfind)
    ocaml(Toploop)
    ocaml(Typedtree)
    ocaml(TypedtreeIter)
    ocaml(Typemod)
    ocaml(Types)
    ocaml(UTop)
    ocaml(UTop_history)
    ocaml(UTop_token)
    ocaml(Uchar)
    ocaml(Unix)
    ocaml(Warnings)
    ocaml(Zed_cursor)
    ocaml(Zed_edit)
    ocaml(Zed_input)
    ocaml(Zed_lines)
    ocaml(Zed_macro)
    ocaml(Zed_re)
    ocaml(Zed_rope)
    ocaml(Zed_utf8)
    ocaml(runtime)


Provides
--------
utop-devel:
    ocaml-utop-devel(x86-64)
    utop-devel
    utop-devel(x86-64)

utop:
    ocaml(UTop)
    ocaml(UTop_complete)
    ocaml(UTop_history)
    ocaml(UTop_lexer)
    ocaml(UTop_main)
    ocaml(UTop_private)
    ocaml(UTop_styles)
    ocaml(UTop_token)
    ocaml-utop(x86-64)
    utop
    utop(x86-64)

Comment 8 Sergey Avseyev 2018-03-16 15:12:58 UTC
Thank you, Ben.

Comment 9 Gwyn Ciesla 2018-03-16 15:17:11 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/utop


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