https://osmocom.org/https://osmocom.org/favicon.ico?16647414092019-02-08T15:50:06ZOpen Source Mobile CommunicationsCellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=132902019-02-08T15:50:06Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>suggestion for osmo-mgw:<br /><a class="external" href="https://gerrit.osmocom.org/#/c/osmo-mgw/+/12861">https://gerrit.osmocom.org/#/c/osmo-mgw/+/12861</a></p> Cellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=132932019-02-08T17:21:06Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>Discussion on IRC has brought up the opinion that we shouldn't install in $prefix/etc/osmocom/ at all during 'make install'.</p>
<ul>
<li>that is the job of the package manager</li>
<li>doesn't make sense to reinvent the wheel for that</li>
<li>we install in share/doc/examples during 'make install' anyway, that should be enough</li>
</ul>
<p>For this we need to adjust packaging and remove the installation to etc/osmocom/.</p>
<p>(Maybe some of our CI processes (docker-playground?) will fall on their faces after this?)</p> Cellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=133132019-02-12T12:26:59Zmsuraev
<ul></ul><p>Is there similar issue with osmo-msc, osmo-bsc etc? I agree that we shouldn't try to replace package manager with makefiles though.</p> Cellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=152242019-07-18T05:18:50Zlaforge
<ul><li><strong>Assignee</strong> set to <i>osmith</i></li></ul> Cellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=154462019-07-30T08:50:12Zosmith
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> Cellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=165962019-12-01T09:11:55Zlaforge
<ul></ul><p>any news? Set to "in progress" 4 months ago without any details?</p> Cellular Network Infrastructure - Bug #3794: 'make install' overwrites $prefix/etc/osmocom/*.cfghttps://osmocom.org/issues/3794?journal_id=167222019-12-03T16:57:31Zosmith
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Sorry for not updating the issue.</p>
I had done some research about existing solutions for this problem. What I could find is:<br />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
<ul>
<li>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</li>
</ul>
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"
<ul>
<li>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</li>
<li>we need to adjust all scripts that are used to "autoreconf -fi; ./configure; make; make install"</li>
</ul>
<p>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.</p>
<p>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 <a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source" class="external">Build from source</a>:</p>
<blockquote>
<p>Please note that <code>make install</code> may overwrite existing Osmocom configuration files. This depends on the <code>--prefix</code> chosen in the <code>./configure</code> step, and the default is <code>/usr/local</code>. For example, if you are running <code>sudo make install</code> for OsmoMSC, with the default prefix, and you already have a <code>/usr/local/etc/osmocom/osmo-msc.cfg</code>, then it will be overwritten.</p>
</blockquote>
<p>And I think we can leave it at that. Setting to resolved. If somebody thinks differently, just reply here.</p>