Project

General

Profile

Actions

Bug #3794

closed

'make install' overwrites $prefix/etc/osmocom/*.cfg

Added by neels about 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
Start date:
02/08/2019
Due date:
% Done:

100%

Spec Reference:

Description

Installation of default config files overwrites etc/osmocom/*.cfg!
We must definitely stop doing that.

Actions #1

Updated by neels about 5 years ago

Actions #2

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?)

Actions #3

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.

Actions #4

Updated by laforge over 4 years ago

  • Assignee set to osmith
Actions #5

Updated by osmith over 4 years ago

  • Status changed from New to In Progress
Actions #6

Updated by laforge over 4 years ago

any news? Set to "in progress" 4 months ago without any details?

Actions #7

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
b) create a "make config" target, which only installs the configs (and overwrites them without asking), and don't do it during a normal "make install"
  • 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 running sudo 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.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)