Bug 965655 - RFE (Singular): include shareable factory-gftables content
Summary: RFE (Singular): include shareable factory-gftables content
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Singular
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-21 13:26 UTC by Rex Dieter
Modified: 2013-08-01 18:13 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-01 18:13:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
.spec patch to implement factory-gftables.noarch subpkg (2.70 KB, patch)
2013-05-21 20:41 UTC, Rex Dieter
no flags Details | Diff

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)


Note You need to log in before you can comment on or make changes to this bug.