Opened 8 years ago
Closed 7 years ago
#14750 closed defect (fixed)
sysconfdir not respected/implemented
Reported by: | felixs | Owned by: | tbd |
---|---|---|---|
Priority: | critical | Milestone: | sage-6.1 |
Component: | distribution | Keywords: | sysconfdir, sage-the-library |
Cc: | Merged in: | ||
Authors: | Felix Salfelder | Reviewers: | Nathann Cohen |
Report Upstream: | N/A | Work issues: | |
Branch: | u/felixs/14750 (Commits, GitHub, GitLab) | Commit: | 573b23ec346f9b6dbcd60f4168f4f6ea59965d84 |
Dependencies: | Stopgaps: |
Description
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
Change History (11)
comment:1 in reply to: ↑ description ; follow-up: ↓ 3 Changed 8 years ago by
comment:2 Changed 8 years ago by
P.S.: Other config files end up below $DOT_SAGE
(which defaults to $HOME/.sage/
).
comment:3 in reply to: ↑ 1 Changed 8 years ago by
Replying to leif:
(It's a bit funny to say Sage doesn't repect that
Makefile
variable when it doesn't even have aconfigure
; Sage's top-level Makefile certainly doesn't follow any of those conventions, and the Sage library currently doesn't usemake
at all.)
My copy of Sage has a configure. I must have repressed the previous state. ;)
Replying to leif:
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.
comment:4 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:5 Changed 8 years ago by
- Commit set to 0f743702bb9e952f1b74fd2d49a5b802ecb0ecab
- Status changed from new to needs_review
Here's a patch...
comment:6 Changed 8 years ago by
- Milestone changed from sage-5.12 to sage-6.0
comment:7 follow-up: ↓ 8 Changed 8 years ago by
- Commit 0f743702bb9e952f1b74fd2d49a5b802ecb0ecab deleted
Could we have a branch name too ? :-P
Nathann
comment:8 in reply to: ↑ 7 Changed 8 years ago by
- Branch set to u/felixs/14750
- Commit set to 573b23ec346f9b6dbcd60f4168f4f6ea59965d84
comment:9 Changed 8 years ago by
- Reviewers set to Nathann Cohen
- Status changed from needs_review to positive_review
Goooooooood to go !
Nathann
comment:10 Changed 7 years ago by
- Milestone changed from sage-6.0 to sage-6.1
comment:11 Changed 7 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
Replying to felixs:
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 aconfigure
; Sage's top-level Makefile certainly doesn't follow any of those conventions, and the Sage library currently doesn't usemake
at all.)