Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysconfdir not respected/implemented #14750

Closed
sagetrac-felixs mannequin opened this issue Jun 16, 2013 · 12 comments
Closed

sysconfdir not respected/implemented #14750

sagetrac-felixs mannequin opened this issue Jun 16, 2013 · 12 comments

Comments

@sagetrac-felixs
Copy link
Mannequin

sagetrac-felixs mannequin commented Jun 16, 2013

Configuration files should be placed into 'sysconfdir' [1]. Files such as gprc.expect in $(SAGE_LOCAL)/etc or default.qepcadrc in $(SAGE_LOCAL) will break future sagelib packaging.
SAGE_LOCAL will supposedly be set to 'prefix' for Sage-the-library packages.

It might make sense to add SAGE_ETC=sysconfdir to the environment (and use that whereever appropriate). sysconfdir defaults to prefix/etc (=SAGE_LOCAL/etc) but can be overridden for custom installations.

[1] www.gnu.org/prep/standards/html_node/Directory-Variables.html‎

Component: distribution

Keywords: sysconfdir, sage-the-library

Author: Felix Salfelder

Branch/Commit: u/felixs/14750 @ 573b23e

Reviewer: Nathann Cohen

Issue created by migration from https://trac.sagemath.org/ticket/14750

@sagetrac-felixs sagetrac-felixs mannequin added this to the sage-5.11 milestone Jun 16, 2013
@nexttime
Copy link
Mannequin

nexttime mannequin commented Jun 16, 2013

Replying to @sagetrac-felixs:

It might make sense to add SAGE_ETC=sysconfdir to the environment (and use that whereever appropriate).

Go ahead (letting SAGE_ETC default to $SAGE_LOCAL/etc)...

(It's a bit funny to say Sage doesn't repect that Makefile variable when it doesn't even have a configure; Sage's top-level Makefile certainly doesn't follow any of those conventions, and the Sage library currently doesn't use make at all.)

@nexttime
Copy link
Mannequin

nexttime mannequin commented Jun 16, 2013

comment:2

P.S.: Other config files end up below $DOT_SAGE (which defaults to $HOME/.sage/).

@sagetrac-felixs
Copy link
Mannequin Author

sagetrac-felixs mannequin commented Jun 16, 2013

comment:3

Replying to @nexttime:

(It's a bit funny to say Sage doesn't repect that Makefile variable when it doesn't even have a configure; Sage's top-level Makefile certainly doesn't follow any of those conventions, and the Sage library currently doesn't use make at all.)

My copy of Sage has a configure. I must have repressed the previous state. ;)

Replying to @nexttime:

P.S.: Other config files end up below $DOT_SAGE (which defaults to $HOME/.sage/).

While I'm at it: How about use something like the following to access config files in general?

def configfile(name):
  if os.exists(HOME + "/.sage/" + name)
    return open(HOME + "/.sage/" + name)
  return open("SAGE_ETC"+name)

This might increase readability and enable overrides.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-felixs
Copy link
Mannequin Author

sagetrac-felixs mannequin commented Aug 26, 2013

Commit: 0f74370

@sagetrac-felixs
Copy link
Mannequin Author

sagetrac-felixs mannequin commented Aug 26, 2013

comment:5

Here's a patch...

@jdemeyer jdemeyer modified the milestones: sage-5.12, sage-6.0 Aug 26, 2013
@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Oct 31, 2013

Changed commit from 0f74370 to none

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Oct 31, 2013

comment:7

Could we have a branch name too ? :-P

Nathann

@sagetrac-felixs
Copy link
Mannequin Author

sagetrac-felixs mannequin commented Oct 31, 2013

comment:8

Replying to @nathanncohen:

Could we have a branch name too ? :-P

yes.

@sagetrac-felixs
Copy link
Mannequin Author

sagetrac-felixs mannequin commented Oct 31, 2013

Commit: 573b23e

@sagetrac-felixs
Copy link
Mannequin Author

sagetrac-felixs mannequin commented Oct 31, 2013

Branch: u/felixs/14750

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Oct 31, 2013

Reviewer: Nathann Cohen

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Oct 31, 2013

comment:9

Goooooooood to go !

Nathann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants