'make install' overwrites $prefix/etc/osmocom/*.cfg
Installation of default config files overwrites etc/osmocom/*.cfg!
We must definitely stop doing that.
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?)
- 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 installmay overwrite existing Osmocom configuration files. This depends on the
--prefixchosen in the
./configurestep, and the default is
/usr/local. For example, if you are running
sudo make installfor 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.