#400 Exception for bundled library FoX in exciting
Closed: Invalid None Opened 10 years ago by marcindulak.

Hi,

packaging exciting: https://bugzilla.redhat.com/show_bug.cgi?id=1064657
exciting is a full-potential all-electron density-functional-theory (DFT) package implementing the families of linearized augmented planewave (LAPW) methods.

The exciting tarball bundles FoX https://github.com/andreww/fox

  • Has the library behaviour been modified? If so, how has it been modified? If the library has been modified in ways that change the API or behaviour then there may be a case for copying. Note that fixing bugs is not grounds to copy. If the library has not been modified (ie: it can be used verbatim in the distro) there's little chance of an exception.

The FoX library bundled with exciting has been modified in order to enable
format-pretty-print option https://github.com/sr76/exciting/commit/f2f97a47d147b2894701a1ac75174cf524b5eb85
According to my limited understanding, this modification changes the format of XML files produced/read by exciting.
Due to the fact that exciting users want to be able to load their old
input files the dependence of exciting on FoX with format-pretty-print option on
is hard to avoid.

  • Why haven't the changes been pushed to the upstream library? If no attempt has been made to push the changes upstream, we shouldn't be supporting people forking out of laziness.

To summarize again the note above: the question is about one option (format-pretty-print) to be off(upstream FoX) vs on(exciting) at the compilation time of FoX.
See the discussion at https://groups.google.com/forum/#!topic/fox-discuss/g-Vx9ejuhF0 which clarifies why this option is not on in FoX, and that exciting developers feel the choice of having the option on is desirable for them: http://exciting-code.org/forum/t-779809/non-standard-format-pretty-print-in-fox

  • Have the changes been proposed to the Fedora package maintainer for the library? In some cases it may make sense for our package to take the changes despite upstream not taking them (for instance, if upstream for the library is dead).

not applicable: there is not FoX package in Fedora.
Upstream FoX is not dead - the last commit is from December 2013.

  • Could we make the forked version the canonical version within Fedora? For instance, if upstream for the library is dead, is the package we're working on that bundles willing to make their fork a library that others can link against?

no, upstream is alive

  • Are the changes useful to consumers other than the bundling application? If so why aren't we proposing that the library be released as a fork of the upstream library?

    i'm not aware of any other project that could profit from packaging FoX
    with format-pretty-print on (i haven't spent much time searching though ...)

  • Is upstream keeping the base library updated or are they continuously one or more versions behind the latest upstream release?

    they are behind and have no plans to change that fact

  • What is the attitude of upstream towards bundling? (Are they eager to remove the bundled version? are they engaged with the upstream for the library? Do they have a history of bundling? Are they argumentative?)

    it's a scientific software - and following the principles of rational ignorance has a positive attitude towards bundling, see http://exciting-code.org/forum/t-779809/non-standard-format-pretty-print-in-fox

  • Overview of the security ramifications of bundling

    unknown to me

  • Does the maintainer of the Fedora package of the library being bundled have any comments about this?

    not applicable

  • Is there a plan for unbundling the library at a later time? Include things like what features would need to be added to the upstream library, a timeline for when those features would be merged, how we're helping to meet those goals, etc.

    probably not


I'd suggest packaging FoX instead, and creating a second set of libraries where prettyprinting is enabled.

At today's meeting we started discussing this but didn't take a vote. We lean towards just fixing the code (look into using the invalid-pretty-print option that FoX upstream is proposing, for instance) or comment#1's idea of two builds of the library but haven't decided that for certain.

It looks to me that even for Fox-4.1.2 one needs to enable format-pretty-print:

sed -i "s/ 27293398$/ ibset(27293398,22)/" src/FoX/dom/m_dom_dom.F90

in order for exciting to read it's xml input files.
Enabling invalid-pretty-print alone is not enough:

sed -i "s/ 27293398$/ ibset(27293398,24)/" src/FoX/dom/m_dom_dom.F90

At least that's the result i get.

How packaging two versions of the library would look like, what would be the package and *so naming?
Are there already cases like that?

I whipped up a FoX package to try to resolve this:

http://spot.fedorapeople.org/FoX-4.1.2-1.fc20.src.rpm \
http://spot.fedorapeople.org/FoX.spec \
http://koji.fedoraproject.org/koji/taskinfo?taskID=6912222 \

This package adds shared libraries and fixes FoX-config to be a useful tool for system linking. It also creates a "dompp" variant library that has format-pretty-print enabled with the sed invocation from the previous comment. To get the sane linking flags for exciting to use these FoX libs:

{{{
./FoX-config --libs --shared --pretty
}}}

For include flags, use:

{{{
./FoX-config --fcflags
}}}

Please test this and let me know if it is what you need for exciting. I have no real vested interest in FoX, so unless you have some strong opposition, I'm inclined to hand this package over to you to add to Fedora and maintain along with exciting.

Thanks. Your package works with exciting, despite FoX warnings:

WARNING(FoX)
Fortran made FoX insert a newline. If whitespace might be significant, check your output.

I have created a Review Request with links to your spec/srpm: https://bugzilla.redhat.com/show_bug.cgi?id=1104289

Log in to comment on this ticket.

Metadata