Bug 549915

Summary: Review Request: FreeMat - An interpreted, matrix-oriented development environment
Product: [Fedora] Fedora Reporter: Henrique "LonelySpooky" Junior <henriquecsj>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: christian.jann, fedora-package-review, ivan.reche, mlists, notting, susi.lehtola
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-26 15:28:35 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 715180    
Bug Blocks: 201449    

Description Henrique "LonelySpooky" Junior 2009-12-22 18:20:06 EST
Spec URL: http://lonelyspooky.com/uploads/rpm/freemat/4.0-1/freemat.spec
SRPM URL: http://lonelyspooky.com/uploads/rpm/freemat/4.0-1/FreeMat-4.0-1.fc12.src.rpm
Description:
Freemat is an interpreted, matrix-oriented development environment for
engineering and scientific applications, similar to the commercial
package MATLAB. Freemat provides visualization, image manipulation,
and plotting as well as parallel programming.

[lonely@localhost i686]$ rpmlint FreeMat-4.0-1.fc12.i686.rpm FreeMat-doc-4.0-1.fc12.i686.rpm FreeMat-debuginfo-4.0-1.fc12.i686.rpm 
FreeMat.i686: E: script-without-shebang /usr/bin/blas.ini
FreeMat.i686: W: devel-file-in-non-devel-package /usr/share/FreeMat-4.0/toolbox/test/addArrays.c
FreeMat-doc.i686: W: no-documentation
3 packages and 0 specfiles checked; 1 errors, 2 warnings.

I still have some issues to work, but I'm really confused here. This FreeMat-debuginfo package was automatically generated by rpmbuild, but my package has some strange requirements that i haven't defined as a "Requires" in my spec:
[lonely@localhost i686]$ su -c 'rpm -ivh FreeMat-4.0-1.fc12.i686.rpm'
Senha:
erro: Dependências não satisfeitas:
	libCore.so é requerido por FreeMat-4.0-1.fc12.i686
	libFN.so é requerido por FreeMat-4.0-1.fc12.i686
	libFreeMatlib.so é requerido por FreeMat-4.0-1.fc12.i686
	libGraphics.so é requerido por FreeMat-4.0-1.fc12.i686
	libMatC.so é requerido por FreeMat-4.0-1.fc12.i686
	libMex.so é requerido por FreeMat-4.0-1.fc12.i686
	libXP.so é requerido por FreeMat-4.0-1.fc12.i686
	libarpack_c.so é requerido por FreeMat-4.0-1.fc12.i686
	libblasref.so é requerido por FreeMat-4.0-1.fc12.i686
	libdynblas.so é requerido por FreeMat-4.0-1.fc12.i686
	liblapack_c.so é requerido por FreeMat-4.0-1.fc12.i686

What is happening?
Comment 1 Susi Lehtola 2009-12-22 18:29:13 EST
Ugh. "blas.ini" in %{_bindir}??

- You're not owning %{_datadir}/%{name}-%{version}/, add
 %dir %{_datadir}/%{name}-%{version}/
to the main %files.

- Are the files in
 %{_datadir}/%{name}-%{version}/help
used by the main program? In that case you don't need to make a separate %doc package. On the other hand if the files are not used by the program itself, use %{_docdir} instead of %{_datadir}.

- I think you are missing some buildrequires, since judging from the project homepage FreeMat links against BLAS. Actually, you should link against ATLAS, which is faster than reference BLAS & LAPACK.
Comment 2 Henrique "LonelySpooky" Junior 2009-12-22 18:49:26 EST
(In reply to comment #1)
> Ugh. "blas.ini" in %{_bindir}??
Yes... it is in the same place that upstream places it (with this strange 644 permission, already fixed). Is it the wrong place?

> - You're not owning %{_datadir}/%{name}-%{version}/, add
>  %dir %{_datadir}/%{name}-%{version}/
> to the main %files.
Thank you, I'm doing it right now.

> - Are the files in
>  %{_datadir}/%{name}-%{version}/help
> used by the main program? In that case you don't need to make a separate %doc
> package. On the other hand if the files are not used by the program itself, use
> %{_docdir} instead of %{_datadir}.
You are right, those help files are more like a collection of manuals and it is used by the main software. I'll merge it.

> - I think you are missing some buildrequires, since judging from the project
> homepage FreeMat links against BLAS. Actually, you should link against ATLAS,
> which is faster than reference BLAS & LAPACK.
I've just look at an "how to build in Linux file", but with a little lack of details. I'm going to do some more reading about linking it in ATLAS.
I'm waiting for some answers from upstream too.

Thank you for your help Jussi.
Comment 3 Susi Lehtola 2009-12-23 03:24:02 EST
(In reply to comment #2)
> (In reply to comment #1)
> > Ugh. "blas.ini" in %{_bindir}??
> Yes... it is in the same place that upstream places it (with this strange 644
> permission, already fixed). Is it the wrong place?

Absolutely. It should be placed in %{_datadir}/%{name}/. Please ask upstream to fix this.
Comment 4 Henrique "LonelySpooky" Junior 2009-12-23 06:29:19 EST
(In reply to comment #3)
> Absolutely. It should be placed in %{_datadir}/%{name}/. Please ask upstream to
> fix this.  
Leave it to me.
Can you tell me something about this implicit requirements that my package is asking for?
By the way, here is a little update in the páckage but I just realized that if we move %{_datadir}/%{name}-%{version}/help to %{_docdir}/%{name}-%{version}/help the help section of the software will break. Is there a more elegant solution to this problem?
Comment 5 Henrique "LonelySpooky" Junior 2009-12-23 06:41:49 EST
ooops! Sorry. Here goes the files.
SPEC: http://lonelyspooky.com/uploads/rpm/freemat/4.0-2/freemat.spec
SRPM: http://lonelyspooky.com/uploads/rpm/freemat/4.0-2/FreeMat-4.0-2.fc12.src.rpm
Comment 6 Susi Lehtola 2009-12-23 07:31:01 EST
(In reply to comment #4)
> (In reply to comment #3)
> > Absolutely. It should be placed in %{_datadir}/%{name}/. Please ask upstream to
> > fix this.  
> Leave it to me.
> Can you tell me something about this implicit requirements that my package is
> asking for?
> By the way, here is a little update in the páckage but I just realized that if
> we move %{_datadir}/%{name}-%{version}/help to
> %{_docdir}/%{name}-%{version}/help the help section of the software will break.
> Is there a more elegant solution to this problem?  

If it breaks, then the files are needed by the main package and thus cannot be placed in -doc, instead they are placed in the main package.

Now you have
 %dir %{_datadir}/%{name}-%{version}
 %{_datadir}/%{name}-%{version}/toolbox
 %{_datadir}/%{name}-%{version}/help
so change this simply to
 %{_datadir}/%{name}-%{version}
or
 %{_datadir}/%{name}-%{version}/
both of which are equivalent, but the latter is IMHO clearer to the reader of the spec file.

It's a bit off that the datadir is versioned. Only a few packages do this. Is there a configure option or whatnot to change the datadir to %{_datadir}/%{name} instead of using %{_datadir}/%{name}-%{version}?
Comment 7 Henrique "LonelySpooky" Junior 2009-12-24 06:48:04 EST
(In reply to comment #6)
> Now you have
>  %dir %{_datadir}/%{name}-%{version}
>  %{_datadir}/%{name}-%{version}/toolbox
>  %{_datadir}/%{name}-%{version}/help
> so change this simply to
>  %{_datadir}/%{name}-%{version}
> or
>  %{_datadir}/%{name}-%{version}/
> both of which are equivalent, but the latter is IMHO clearer to the reader of
> the spec file.
Hi, when I tried to use only %{_datadir}/%{name}-%{version} (or %{_datadir}/%{name}-%{version}) leaving %{_datadir}/%{name}-%{version}/toolbox and %{_datadir}/%{name}-%{version}/help undeclared rpmbuild, at the end, complais about a lot of missing files.
I've tried %{_datadir}/%{name}-%{version}/* too, but the result is the same.
Comment 8 Susi Lehtola 2009-12-24 06:57:38 EST
What exactly did you try? Did you remember to remove the %dir statement, i.e. use
 %{_datadir}/%{name}-%{version}
instead of
 %dir %{_datadir}/%{name}-%{version}
as the latter will own only the directory, not its contents?

The config file should not have executable permissions. Remove
 chmod 755 %{buildroot}/%{_bindir}/blas.ini
Any rpmlint warnings/errors about nonexecutables in %{_bindir} are caused by the idiotic placement of config files in bindir.
Comment 9 Henrique "LonelySpooky" Junior 2010-03-29 22:12:37 EDT
Hi, sorry for the delay. I was a little busy working on two packages. So, I'll be doing some refinements on the entire package. By the way, upstrean is a little unresponsive.
Comment 10 Ivan Ferrucio Reche da Silva Filgueiras 2010-10-16 13:24:31 EDT
I'm also interested in having Freemat in Fedora. It's a great piece of software.
Comment 11 Jason Tibbitts 2010-11-16 11:21:19 EST
I guess we still haven't see that updated package.
Comment 12 Henrique "LonelySpooky" Junior 2010-11-18 06:21:34 EST
Hi, folks, I'm connected again and back to work. Wait for some news soon.