https://bugzilla.redhat.com/show_bug.cgi?id=1055391
--- Comment #4 from Michel Alexandre Salim <michel+fdr(a)sylvestre.me> ---
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.fc2...
✗ 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component