Bug #3794
closed'make install' overwrites $prefix/etc/osmocom/*.cfg
100%
Description
Installation of default config files overwrites etc/osmocom/*.cfg!
We must definitely stop doing that.
Updated by neels about 5 years ago
suggestion for osmo-mgw:
https://gerrit.osmocom.org/#/c/osmo-mgw/+/12861
Updated by neels about 5 years ago
Discussion on IRC has brought up the opinion that we shouldn't install in $prefix/etc/osmocom/ at all during 'make install'.
- that is the job of the package manager
- doesn't make sense to reinvent the wheel for that
- we install in share/doc/examples during 'make install' anyway, that should be enough
For this we need to adjust packaging and remove the installation to etc/osmocom/.
(Maybe some of our CI processes (docker-playground?) will fall on their faces after this?)
Updated by msuraev about 5 years ago
Is there similar issue with osmo-msc, osmo-bsc etc? I agree that we shouldn't try to replace package manager with makefiles though.
Updated by laforge over 4 years ago
any news? Set to "in progress" 4 months ago without any details?
Updated by osmith over 4 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Sorry for not updating the issue.
I had done some research about existing solutions for this problem. What I could find is:a) play package manager and check for existing/modified configs, do not install new configs (like in Neels' patch) or install new configs as .sample
- problem: when doing "make install", then checking out a commit that creates a different default config, then doing "make install" again: it seems that the user has modified the config file and it will not be overwritten
- while it should make it more clear, that this overwrites configs and should be used with care, it introduces an awkward new step during the installation that is probably confusing at first
- we need to adjust all scripts that are used to "autoreconf -fi; ./configure; make; make install"
I'm not really happy with any of these solutions... each one takes a lot of effort to implement as all repositories need to be touched, and in the end they will change the behavior of "make install" and make it more confusing.
Since the default prefix is /usr/local, I think it is highly unlikely that anybody overwrites any important configs (usually in /etc/osmocom/, not /usr/local/etc/osmocom!) by using "make install". So I have added a warning to the wiki page for Build from source:
Please note that
make install
may overwrite existing Osmocom configuration files. This depends on the--prefix
chosen in the./configure
step, and the default is/usr/local
. For example, if you are runningsudo make install
for OsmoMSC, with the default prefix, and you already have a/usr/local/etc/osmocom/osmo-msc.cfg
, then it will be overwritten.
And I think we can leave it at that. Setting to resolved. If somebody thinks differently, just reply here.