FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 12-06-2010, 04:37 PM
Jussi Lehtola
 
Default Issues with Fortran modules

On Mon, 06 Dec 2010 10:22:47 -0700
Orion Poplawski <orion@cora.nwra.com> wrote:
> Apparently there is a "GFORTRAN module version" number assigned to
> Fortran modules created by gfortran:

Yes, see section "Modules and include files" in

http://fedoraproject.org/wiki/Packaging:Fortran

> So, it makes sense to me to encode this into the rpm dependencies
> somehow. Perhaps gcc-gfortran can provides a gfortran-abi(VERSION)
> and the gfortran module packages can require it. rpm would need to
> automatically generate the requires though.
>
> Thoughts? Suggestions?

Yes, this would be a nice thing to have, it would reveal instantly
whenever people have forgot to (mass)rebuild Fortran packages.
--
Jussi Lehtola
Fedora Project Contributor
jussilehtola@fedoraproject.org
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 01-31-2011, 12:14 PM
Panu Matilainen
 
Default Issues with Fortran modules

On 12/06/2010 07:37 PM, Jussi Lehtola wrote:
> On Mon, 06 Dec 2010 10:22:47 -0700
> Orion Poplawski<orion@cora.nwra.com> wrote:
>> Apparently there is a "GFORTRAN module version" number assigned to
>> Fortran modules created by gfortran:
>
> Yes, see section "Modules and include files" in
>
> http://fedoraproject.org/wiki/Packaging:Fortran
>
>> So, it makes sense to me to encode this into the rpm dependencies
>> somehow. Perhaps gcc-gfortran can provides a gfortran-abi(VERSION)
>> and the gfortran module packages can require it. rpm would need to
>> automatically generate the requires though.
>>
>> Thoughts? Suggestions?
>
> Yes, this would be a nice thing to have, it would reveal instantly
> whenever people have forgot to (mass)rebuild Fortran packages.

Returning this oldish issue now that there's something that can
reasonably be done about it...

With rpm >= 4.9.0 packages can drop in their own dependency extractors
without having to patch rpm itself. I'm not at all familiar with fortran
peculiarities (all the more reason for having this outside rpm), but
I'll outline the basic idea that should get you started based on the above.

To add a dependency generator, you need to drop a rule file into
%{_rpmconfigdir}/fileattrs/. The rule would probably be something like
this (classify *.mod files in %{_libdir}/gfortran/modules/ as gfortran):

/usr/lib/rpm/fileattrs/gfortran.attr:
%__gfortran_requires %{_rpmconfigdir}/gfortran.req
%__gfortran_path ^%{_libdir}/gfortran/modules/.*.mod$

Then you'll need to come up with the actual generator script
(gfortran.req in the above example) that parses the .mod and emits the
dependencies. At it's simplest it might be something like this, although
for a real world version you'd want to do extra sanity checking, remove
quotes etc:

----
#!/bin/sh

while read FNAME; do
head -1 $FNAME | awk '{print "gfortran(abi) = "$4}'
done
----

And finally something needs to create the matching provide, whether it's
possible/sensible to create with a automated rule like the above or
better to just manual use "Provides: gfortran(abi) = <something>" in
gfortran spec depends on the details of which I've no clue
These rules + scripts should go a package that's always present when
building gfortran modules, in this case gcc-gfortran sounds like a
fairly obvious choice.

- Panu -
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 08:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org