bugGNU Octave - Bugs: bug #35392, Moving global config to /etc/octave

 
 

bug #35392: Moving global config to /etc/octave

Submitter:  Cedric <manday>
Submitted:  Sat 28 Jan 2012 09:27:27 PM UTC
   
 
Category:  Configuration and Build System Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 21 Oct 2020 02:21:36 AM UTC, comment #10: 

All other bugs mentioned in comment #9 are closed.  No contributions for 4 years, not very exciting ideas here.

Closing report.

Kai Torben Ohlhus <siko1056>
Group Member
Fri 09 Sep 2016 04:01:47 AM UTC, comment #9: 

Should we close bugs that have no people working on them even if they are still valid?

The following bugs are all related to locations of startup configuration files and IMHO are all worth working on at some point

Mike Miller <mtmiller>
Group Member
Wed 07 Sep 2016 04:24:44 PM UTC, comment #8: 

@Mike: The last response on this was from June 2015.  Do you want to change to using sysconfdir for octaverc, or should we acknowledge that no one has had sufficient interest to implement this and close it.

Rik <rik5>
Group administrator
Thu 04 Jun 2015 12:26:42 AM UTC, comment #7: 

This bug is still actionable. There are a few open bugs all having to do with the location of startup files.

Octave currently kind of follows the gdb model, in that configs are loaded from a system-wide config file, a user config file, and a startup file in the current directory.

This bug is about moving the system-wide startup file to something like $(sysconfdir)/octave/octaverc by default, or maybe allowing it to be configured, as gdb does in its configure script. Right now it defaults to $(datadir)/octave/$(version)/m/startup/octaverc with no easy way to change that. The user can set the OCTAVE_VERSION_INITFILE enviroment variable, and that is documented, but can't be set to something else globally.

But then there is also a site configuration file that is different from the version configuration file. Should both be moved to $(sysconfdir), one or the other, or neither? Or should a startup file in $(sysconfdir) be in addition to the current startup files? Lots of options.

Updating release to dev.

Mike Miller <mtmiller>
Group Member
Sun 28 Dec 2014 01:46:15 AM UTC, comment #6: 

Do we need to do anything here, or can we close this bug report?  We won't change Octave to unilaterally place files in /etc, and there is already a workaround by setting environment variables like --sysconfdir if this is what really is required.

Rik <rik5>
Group administrator
Mon 27 Jan 2014 04:59:24 PM UTC, comment #5: 

Right, I think that is taken care of by using $(sysconfdir), which will be $(prefix)/etc by default, and most distributions automatically pass --sysconfdir=/etc to configure in their packaging infrastructure. I don't know that we need special logic to change it to /etc when $(prefix) happens to be /usr. Anyone who cares about having only non-modifiable files under /usr ought to be able to pass --sysconfdir=/etc to configure.

Using $(sysconfdir)/octave/octaverc for the site configuration file might be the best way to address this.

This could be changed along with another bug, bug #36477, which is about using XDG_CONFIG_HOME (default=~/.config) for storing user preferences. We already use ~/.config/octave for the experimental GUI qt-settings file. So ~/.config/octave/octaverc could go right alongside that nicely.

Mike Miller <mtmiller>
Group Member
Mon 27 Jan 2014 04:36:10 PM UTC, comment #4: 

By default, everything should go under $prefix so that normal users can install Octave in directories that don't require root permissions.

Also, it is convenient to have everthing under a single $prefix directory so that removing Octave can be as simple as removing a directory tree.

If $prefix is /usr, we might put configuration files in /etc by default, but /etc should not be used if $prefix is $HOME/octave-3.8.0, for example.

John W. Eaton <jwe>
Group administrator
Mon 27 Jan 2014 12:51:40 PM UTC, comment #3: 

It appears that where to put things like startup
configuration files is as unstructured as most things
in Linux, but at least the Fedora preference seems to
be (or is becoming) to use <home dir>.local/share/...

This is for individual users. System-wide stuff goes
here and there, /etc. etc....

/etc/octave seems a good choice.

Michael Godfrey <godfrey>
Group Member
Mon 27 Jan 2014 08:16:35 AM UTC, comment #2: 

Yes, I think this is a good solution. Thank you.

Cedric <manday>
Mon 27 Jan 2014 01:17:46 AM UTC, comment #1: 

This can be effectively done with the current version of Octave by building like this:


./configure ...
make \
    startupfiledir='/etc/octave/$(version)/startup' \
    localstartupfiledir='/etc/octave/site/startup'
make install \
    startupfiledir='/etc/octave/$(version)/startup' \
    localstartupfiledir='/etc/octave/site/startup'


Octave will then look for the version and site startup files in those directories.

Is this a valid solution for what you want?

Mike Miller <mtmiller>
Group Member
Sat 28 Jan 2012 09:27:27 PM UTC, original submission:  

The documentation mentions only a per-user and a static configuration, but no configuration in the typical /etc directory for system wide configuration.

By convention, software should not be configured through modifying installation data in /usr, which is de facto standard for many distributions.

Therefore, octave should accept /etc/octave/(<version>|site)/startup instead of or in addition to the config in /usr

Cedric <manday>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by manday (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-19 mtmiller Carbon-CopyRemoved 80942 -
    2020-10-21 siko1056 StatusNeed Info Wont Fix
        Open/ClosedOpen Closed
        Summary/etc/octaverc Moving global config to /etc/octave
    2015-06-04 mtmiller CategoryInterpreter Configuration and Build System
        Priority5 - Normal 3 - Low
        Release3.6.0 dev
    2014-01-27 mtmiller Severity3 - Normal 1 - Wish
        StatusNone Need Info
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code