Bug 1055391 - Review Request: ocaml-easy-format - High-level and functional interface to the Format module
Summary: Review Request: ocaml-easy-format - High-level and functional interface to th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1055393 1055396
TreeView+ depends on / blocked
 
Reported: 2014-01-20 07:27 UTC by Michel Alexandre Salim
Modified: 2015-09-17 12:50 UTC (History)
3 users (show)

Fixed In Version: ocaml-easy-format-1.0.2-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-03 02:45:41 UTC
Type: ---
loganjerry: fedora-review+


Attachments (Terms of Use)

Description Michel Alexandre Salim 2014-01-20 07:27:08 UTC
Spec URL: http://salimma.fedorapeople.org/specs/ocaml/ocaml-easy-format.spec
SRPM URL: http://salimma.fedorapeople.org/specs/ocaml/ocaml-easy-format-1.0.2-1.fc20.src.rpm
Description: 
This module offers a high-level and functional interface to the Format
module of the OCaml standard library. It is a pretty-printing
facility, i.e. it takes as input some code represented as a tree and
formats this code into the most visually satisfying result, breaking
and indenting lines of code where appropriate.

Input data must be first modelled and converted into a tree using 3
kinds of nodes:

    atoms
    lists
    labelled nodes

Atoms represent any text that is guaranteed to be printed as-is. Lists
can model any sequence of items such as arrays of data or lists of
definitions that are labelled with something like "int main", "let x
=" or "x:".
Fedora Account System Username: salimma

Comment 1 Jerry James 2014-01-20 16:43:01 UTC
I will take this one.  Would you mind reviewing bug 1021017 in exchange?

Comment 2 Jerry James 2014-01-20 19:01:09 UTC
Issues, in no particular order:

1) These lines at the top of the spec file:

   %global debug_package %{nil}
   %global _use_internal_dependency_generator 0
   %global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
   %global __find_provides /usr/lib/rpm/ocaml-find-provides.sh

   should all be removed.  The first is not necessary starting in Fedora
   19, and was actively removed from ocaml packages in Fedora 20 (see
   https://lists.fedoraproject.org/pipermail/devel/2013-September/189247.html).
   The last three lines have not been needed for a very long time; I
   don't remember now when they became unnecessary, but it was prior to
   Fedora 19.  Also, the strip invocation in %install should be removed,
   and we need to figure out how to add -g to the compiler flags,
   probably with something like this in %prep:

   sed -i 's/ocamlopt/ocamlopt -g/;s/ocamlc \(-[co]\)/ocamlc -g \1/' Makefile

2) The build seems to need ocaml-findlib only, not ocaml-findlib-devel;
   i.e., the ocamlfind tool is used, but I don't see any use of the
   ocaml-findlib library in the source code.

3) Not all architectures support ocaml.  Add this to your spec file:

   ExclusiveArch: %{ocaml_arches}

4) There is no need to build the bytecode version for architectures that
   support native code.  I suggest changing the make invocation to this,
   without the leading "make":

   %if %opt
   make %{?_smp_mflags} opt
   %else
   make %{?_smp_mflags}
   %endif

5) Since the packages are arch-specific, the dependency from the -devel
   subpackage to the main package should include %{?_isa}.

6) Consider adding a %check section.  The "make test" invocation just
   creates output files without checking them for correctness, so that's
   not sufficient, unless you are just testing for crashes, or the like.
   There may not be a reasonable test to run.  I will leave this to your
   disgression.

7) The description contains two British English spellings, as noted by
   the spell checker (see below).  American English uses only one 'l'
   where British English uses two in "modeled" and "labeled".

8) The line:

   rm -rf $RPM_BUILD_ROOT

   at the top of %install is not needed in Fedora.  The versions of RPM
   in all supported Fedora releases do this already.  (If you are
   thinking of building the package for EPEL, that's another story.)

9) Rpmlint complains about %define libname.  I understand that you can't
   use %global at that location, since %{name} hasn't been defined yet.
   One solution to that is to use %global, but move the definition
   farther down in the spec file, perhaps just above %description.

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

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


===== 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.
[x]: License file installed when any subpackage combination is installed.
[!]: %build honors applicable compiler flags or justifies otherwise.
     The flags are missing -g; see issue #1 above.
[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.
[!]: Spec file is legible and written in American English.
     See the spell checker's output below.  American English uses only
     one 'l' where British English uses two: "modeled" and "labeled".
     See issue #7 above.
[-]: Package contains systemd file(s) if in need.
[!]: Useful -debuginfo package or justification otherwise.
     See issue #1 above.
[!]: Package is not known to require an ExcludeArch tag.
     This is missing.  See issue #3 above.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 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 %doc.
[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]: 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 do not use a name that already exist
[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

Ocaml:
[x]: This should never happen

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

Generic:
[!]: Uses parallel make %{?_smp_mflags} macro.
     Admittedly, there is almost no scope for parallel building, but can
     this be added without causing build errors?
[-]: 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 ocaml-easy-
     format-devel
     Since the packages are arch-specific, please add the %{?_isa}
     part.  See issue #5 above.
[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.
     See issue #6 above.
[x]: Packages should try to preserve timestamps of original installed files.
[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define libname %(echo %{name} |
     sed -e 's/^ocaml-//')
     See issue #9 above.
[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]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX is a working URL.

===== 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: ocaml-easy-format-1.0.2-1.fc21.x86_64.rpm
          ocaml-easy-format-devel-1.0.2-1.fc21.x86_64.rpm
          ocaml-easy-format-1.0.2-1.fc21.src.rpm
ocaml-easy-format.x86_64: W: spelling-error %description -l en_US modelled -> modeled, model led, model-led
ocaml-easy-format.x86_64: W: spelling-error %description -l en_US labelled -> labeled, la belled, la-belled
ocaml-easy-format.src: W: spelling-error %description -l en_US modelled -> modeled, model led, model-led
ocaml-easy-format.src: W: spelling-error %description -l en_US labelled -> labeled, la belled, la-belled
3 packages and 0 specfiles checked; 0 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint ocaml-easy-format-devel ocaml-easy-format
ocaml-easy-format.x86_64: W: spelling-error %description -l en_US modelled -> modeled, model led, model-led
ocaml-easy-format.x86_64: W: spelling-error %description -l en_US labelled -> labeled, la belled, la-belled
2 packages and 0 specfiles checked; 0 errors, 2 warnings.
# echo 'rpmlint-done:'



Requires
--------
ocaml-easy-format-devel (rpmlib, GLIBC filtered):
    ocaml-easy-format

ocaml-easy-format (rpmlib, GLIBC filtered):
    ocaml(Buffer)
    ocaml(Format)
    ocaml(Hashtbl)
    ocaml(Int32)
    ocaml(List)
    ocaml(Obj)
    ocaml(Pervasives)
    ocaml(Printf)
    ocaml(String)
    ocaml(runtime)



Provides
--------
ocaml-easy-format-devel:
    ocaml-easy-format-devel
    ocaml-easy-format-devel(x86-64)

ocaml-easy-format:
    ocaml(Easy_format)
    ocaml-easy-format
    ocaml-easy-format(x86-64)



Source checksums
----------------
http://mjambon.com/releases/easy-format/easy-format-1.0.2.tar.gz :
  CHECKSUM(SHA256) this package     : f1e763a3b5962b87698786f5e1e17e46311106dc76fd2e2ef822cd8df37d941f
  CHECKSUM(SHA256) upstream package : f1e763a3b5962b87698786f5e1e17e46311106dc76fd2e2ef822cd8df37d941f


Generated by fedora-review 0.5.1 (bb9bf27) last change: 2013-12-13
Command line :/usr/bin/fedora-review -b 1055391 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Ocaml
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, EPEL5, BATCH, DISTTAG

Comment 3 Michel Alexandre Salim 2014-01-21 08:19:53 UTC
(In reply to Jerry James from comment #1)
> I will take this one.  Would you mind reviewing bug 1021017 in exchange?

Certainly, taken

(In reply to Jerry James from comment #2)
> Issues, in no particular order:
> 

Will get them fixed at the next revision

Comment 4 Michel Alexandre Salim 2014-01-21 14:52:15 UTC
Spec URL: http://salimma.fedorapeople.org/specs/ocaml/ocaml-easy-format.spec
SRPM URL: http://salimma.fedorapeople.org/specs/ocaml/ocaml-easy-format-1.0.2-2.fc20.src.rpm

✗ rpmlint /var/lib/mock/fedora-20-x86_64-oef/result/ocaml-easy-format-*.x86_64.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.

Review feedback incorporated, details below:


(In reply to Jerry James from comment #2)
> Issues, in no particular order:
> 
> 1) These lines at the top of the spec file:
> 
>    %global debug_package %{nil}
>    %global _use_internal_dependency_generator 0
>    %global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
>    %global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
> 
>    should all be removed.  The first is not necessary starting in Fedora
>    19, and was actively removed from ocaml packages in Fedora 20 (see
>   
> https://lists.fedoraproject.org/pipermail/devel/2013-September/189247.html).

Aha, thanks! As it turns out the debug_package nullification is still needed when ocamlopt is not present (tested by overriding opt to 0) so I've if-guarded it.

>    The last three lines have not been needed for a very long time; I
>    don't remember now when they became unnecessary, but it was prior to
>    Fedora 19.  Also, the strip invocation in %install should be removed,
>    and we need to figure out how to add -g to the compiler flags,
>    probably with something like this in %prep:
> 
>    sed -i 's/ocamlopt/ocamlopt -g/;s/ocamlc \(-[co]\)/ocamlc -g \1/' Makefile
> 
That line works, thanks. As for the dependency generator, wow, someone needs to update those templates.

> 2) The build seems to need ocaml-findlib only, not ocaml-findlib-devel;
>    i.e., the ocamlfind tool is used, but I don't see any use of the
>    ocaml-findlib library in the source code.
> 
Yes, works fine once I depended only on ocaml-findlib.

> 3) Not all architectures support ocaml.  Add this to your spec file:
> 
>    ExclusiveArch: %{ocaml_arches}
> 
Added

> 4) There is no need to build the bytecode version for architectures that
>    support native code.  I suggest changing the make invocation to this,
>    without the leading "make":
> 
>    %if %opt
>    make %{?_smp_mflags} opt
>    %else
>    make %{?_smp_mflags}
>    %endif
> 
I've modified it since upstream's Makefile is a bit unusual (the default target invoked 'all' and 'opt' -- the latter is a no-op that just creates a marker to tell make install to copy additional files). so the non-optimizing case just calls make all (this way, I can test building non-ocamlopt builds even on my x86_64 mock environment)

> 5) Since the packages are arch-specific, the dependency from the -devel
>    subpackage to the main package should include %{?_isa}.
> 
Added (again, the newspec template... sigh)

> 6) Consider adding a %check section.  The "make test" invocation just
>    creates output files without checking them for correctness, so that's
>    not sufficient, unless you are just testing for crashes, or the like.
>    There may not be a reasonable test to run.  I will leave this to your
>    disgression.
> 
I'm using upstream's test suite for now, even though it's incomplete.

> 7) The description contains two British English spellings, as noted by
>    the spell checker (see below).  American English uses only one 'l'
>    where British English uses two in "modeled" and "labeled".
> 
Fixed

> 8) The line:
> 
>    rm -rf $RPM_BUILD_ROOT
> 
>    at the top of %install is not needed in Fedora.  The versions of RPM
>    in all supported Fedora releases do this already.  (If you are
>    thinking of building the package for EPEL, that's another story.)
> 
Fixed

> 9) Rpmlint complains about %define libname.  I understand that you can't
>    use %global at that location, since %{name} hasn't been defined yet.
>    One solution to that is to use %global, but move the definition
>    farther down in the spec file, perhaps just above %description.
> 
Good idea, thanks.

Comment 5 Jerry James 2014-01-21 15:37:16 UTC
(In reply to Michel Alexandre Salim from comment #4)
> Aha, thanks! As it turns out the debug_package nullification is still needed
> when ocamlopt is not present (tested by overriding opt to 0) so I've
> if-guarded it.

Hmmm, that's a good point.  I don't think that was done during the mass enabling of debuginfo for ocaml packages.  Maybe we don't currently have any architectures that support byte-code-only ocaml, so nobody has noticed?

> That line works, thanks. As for the dependency generator, wow, someone needs
> to update those templates.

Agreed.  I'll see if I can poke somebody to do that.

You handled all of the issues I brought up, and a re-review did not turn up any new issues, so this package is APPROVED.

Comment 6 Michel Alexandre Salim 2014-01-22 09:37:07 UTC
Thank you very much for reviewing.

New Package SCM Request
=======================
Package Name: ocaml-easy-format
Short Description: High-level and functional interface to the Format module
Owners: salimma
Branches: f19 f20
InitialCC:

Comment 7 Gwyn Ciesla 2014-01-22 12:58:22 UTC
Git done (by process-git-requests).

Comment 8 Fedora Update System 2014-01-22 14:35:40 UTC
ocaml-easy-format-1.0.2-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ocaml-easy-format-1.0.2-2.fc19

Comment 9 Fedora Update System 2014-01-22 14:35:50 UTC
ocaml-easy-format-1.0.2-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ocaml-easy-format-1.0.2-2.fc20

Comment 10 Fedora Update System 2014-01-23 11:04:09 UTC
ocaml-easy-format-1.0.2-2.fc19 has been pushed to the Fedora 19 testing repository.

Comment 11 Fedora Update System 2014-02-03 02:45:41 UTC
ocaml-easy-format-1.0.2-2.fc19 has been pushed to the Fedora 19 stable repository.

Comment 12 Fedora Update System 2014-02-03 02:45:57 UTC
ocaml-easy-format-1.0.2-2.fc20 has been pushed to the Fedora 20 stable repository.

Comment 13 Ding-Yi Chen 2015-09-17 00:43:02 UTC
New Package SCM Request
=======================
Package Name: ocaml-cppo
Short Description: Equivalent of the C preprocessor for OCaml programs
Owners: salimma
Branches: epel7 el6
InitialCC:

Comment 14 Gwyn Ciesla 2015-09-17 12:50:54 UTC
WARNING: Requested package name ocaml-cppo doesn't match bug summary
ocaml-easy-format


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