Bug 965655

Summary: RFE (Singular): include shareable factory-gftables content
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: SingularAssignee: Rex Dieter <rdieter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: paulo.cesar.pereira.de.andrade, rdieter
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 18:13:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
.spec patch to implement factory-gftables.noarch subpkg none

Description Rex Dieter 2013-05-21 13:26:26 UTC
Been meaning to work on packaging factory-gftables for awhile, but kept putting it off.  :)

Macaulay2 (and other factory consumers I'd imagine) would be happier if factory-gftables were available.

They're pregenerated @
http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/Factory/factory-gftables.tar.gz

I'd venture we'd want to make a factory-gftables.noarch subpkg

Alternatively, and possibly better now that I think about it, would you prefer that I simply package factory-gftables content separately from Singular?  (it *is* static content, not sure how often we'd ever want to rebuild it...)

Comment 1 Paulo Andrade 2013-05-21 15:07:15 UTC
I am fine with it being split from Singular.
Directory location should be easy to correct with a
symlink, but not sure about actual file names, so, feel
free to do it the way Macaulay2 expects.

Comment 2 Rex Dieter 2013-05-21 18:23:54 UTC
can you elaborate, its not clear to me what you'd prefer:

1.  build factory-gftables subpkg from Singuar.spec

2.  build factory-gftables separate from Singular

??

Comment 3 Rex Dieter 2013-05-21 18:28:25 UTC
OK, wierd, Singular seems to have it's own copies (generated at build time?) and in a slightly different layout:

/usr/lib64/Singular/LIB/gftables

taking a closer look

Comment 4 Rex Dieter 2013-05-21 19:21:35 UTC
OK, it's... a little silly, but,

factory seems to expect these in the form:
/usr/share/factory/gftables/gftables.x.y

and Singular (includes them already in its tarball) in the form:
%{_libdir}/Singular/LIB/gftables/z

where z = x^y

So, it should be theoretically possible to share this data programmatically.  I'll have to think a bit on how best to do it.

Comment 5 Rex Dieter 2013-05-21 20:41:51 UTC
Created attachment 751371 [details]
.spec patch to implement factory-gftables.noarch subpkg

First try, how's this look to you?

Comment 6 Paulo Andrade 2013-05-21 23:36:37 UTC
You probably need to test it a bit, because
there is code like this factory/gfops.cc:

    if (gftable_dir)
    {
      [...]
    }
    else
    {
#ifndef SINGULAR
      sprintf( buffer, GFTABLEDIR "/gftable.%d.%d", p, n );
      gffilename = buffer;
      inputfile = fopen( buffer, "r" );
#else
      sprintf( buffer, "gftables/%d", q );
      gffilename = buffer;
      inputfile = feFopen( buffer, "r" );
#endif
    }

GFTABLEDIR can be redefined (again need to check).
But as I understand it, you will just pass some
path matching "GFTABLEDIR" under /usr/share.

The proper approach should be to tell Singular and
libfac to also use it.

Well, I believe your patch should be good enough,
but I did not actually fool proof test it :-)

Comment 7 Rex Dieter 2013-05-22 18:43:19 UTC
config.h:#define GFTABLEDIR "/usr/share/factory/gftables"

OK, I'll commit, and see how things go.

Comment 8 Rex Dieter 2013-08-01 18:13:17 UTC
* Tue May 21 2013 Rex Dieter <rdieter> - 3.1.5-6
- factory-gftables.noarch subpkg (#965655)