https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092017-11-15T20:37:40ZOpen Source Mobile CommunicationsCellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=62332017-11-15T20:37:40Zlynxis
<ul></ul><p>I would expect a "working" configuration. So everything is connecting to each other. As BTS we could either configure an example sysmobts or use virtual-phy.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=62342017-11-15T20:38:04Zlynxis
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-6 priority-4 priority-high2 closed" href="/issues/2620">Bug #2620</a>: Testing NITB Migration Guide</i> added</li></ul> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=62362017-11-16T00:28:06Zlynxis
<ul><li><strong>Subject</strong> changed from <i>Debian packages: Instal configs to /etc/osmocom/ or not?</i> to <i>Debian packages: Install configs to /etc/osmocom/ or not?</i></li></ul> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=106552018-08-08T09:45:28Zlaforge
<ul><li><strong>Subject</strong> changed from <i>Debian packages: Install configs to /etc/osmocom/ or not?</i> to <i>Debian packages: Install configs to /etc/osmocom/ + systemd .service files</i></li><li><strong>Assignee</strong> changed from <i>laforge</i> to <i>pespin</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>High</i></li></ul><p>I agree, we should install our default configs (expecting everything on localhost) and install systemd .service files.</p>
<p>I think we should not automatically start the services, i.e. no "systemctl enable" so users can chose for themselves when to run them or whether to automatically start them at system boot.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=111372018-09-04T16:53:25Zpespin
<ul></ul><p>A bit of summary of stuff required.</p>
<p>For each project here:<br /><pre>
libosmo-sccp
osmo-iuh
osmo-hlr
osmo-ggsn
osmo-sgsn
osmo-mgw
osmo-msc
osmo-bsc
osmo-bts
osmo-pcu
osmo-trx
osmo-sip-connector
openbsc
</pre></p>
Make sure:
<ul>
<li>systemd files for all daemon-alike binaries are included in the git repo and shipped in a debian package. Do so by linking <strong>.service file to debian/</strong>.service.</li>
<li>Make sure a sample config file is provided in both /usr/share/doc and /etc/osmocom (and make sure the /etc file matches the -C param in systemd file). Do so by installing them through autotools, then assign the file in debian/*.install files.</li>
<li>Update OE recipes accordingly in laforge/nightly.</li>
</ul>
<p>As per "make sure systemd services are not enabled by default", I recall reading they were not, but I'll do some tests to confirm.</p>
<p>Regarding config files, it seems there exists "debian/conffiles" [1,2], but according to [3] it may be easier to enable dh_installdeb if it's not already:<br /><pre>
5.3. conffiles
One of the most annoying things about software is when you spend a great deal of time and effort customizing a program, only to have an upgrade stomp all over your changes. Debian solves this problem by marking such configuration files as conffiles. When you upgrade a package, you'll be asked whether you want to keep your old configuration files or not.
dh_installdeb(1) automatically flags any files under the /etc directory as conffiles, so if your program only has conffiles there you do not need to specify them in this file. For most package types, the only place conffiles should ever be is under /etc, and so this file doesn't need to exist.
</pre></p>
<p>[1] <a class="external" href="http://man7.org/linux/man-pages/man5/deb-conffiles.5.html">http://man7.org/linux/man-pages/man5/deb-conffiles.5.html</a><br />[2] <a class="external" href="https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html">https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html</a><br />[3] <a class="external" href="https://www.debian.org/doc/manuals/maint-guide/dother.en.html">https://www.debian.org/doc/manuals/maint-guide/dother.en.html</a></p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=111702018-09-06T10:13:49Zpespin
<ul></ul><p>I did some tests and indeed systemd services are not enabled/started by default, so no need to do any changes related to that.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=111762018-09-06T13:35:36Zpespin
<ul></ul><p>With last bunch of patches I pushed to different projects, systemd services on debian packages should be all done.</p>
<p>We should actually install systemd services during "make install" time. Follow link section "Installing systemd Service File" explains how to do it: <a class="external" href="https://www.freedesktop.org/software/systemd/man/daemon.html">https://www.freedesktop.org/software/systemd/man/daemon.html</a></p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=112842018-09-12T12:50:56Zpespin
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>50</i></li></ul><p>Patches for mentioned osmocom projects installing system service files from autotools have been pushed.</p>
<p>Now only .cfg relatd stuff is missing.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=112852018-09-12T13:18:56Zpespin
<ul></ul><p>I did some tests in a debian system iwth osmo-pcu, which already installs /etc/osmocom/osmo-pcu.cfg.<br />I installed it, then removed it and .cfg file is left there. I modified some lines. Then I installed osmo-pcu again, and modified .cfg file is kept, so it seems dh_installdeb is handling it correctly as a cfg file.</p>
<p>In the event we have something in /etc/ we don't want to handle as a config file, a symlink needs to be created from /var:<br /><pre>
If the program you're packaging requires every user to modify the configuration files in the /etc directory, there are two popular ways to arrange for them to not be conffiles, keeping dpkg quiet:
Create a symlink under the /etc directory pointing to a file under the /var directory generated by the maintainer scripts.
Create a file generated by the maintainer scripts under the /etc directory.
</pre></p>
<p>So what's missing now, is making sure all projects needing it install a sane .cfg file into /etc/osmocom.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=113222018-09-12T18:44:52Zpespin
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>70</i></li></ul><p>I wrote patches to install /etc/osmocom/*.cfg stuff and I'm building changes now with OBS. I'll probably submit them tomorrow.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=113302018-09-13T11:28:10Zpespin
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>70</i> to <i>90</i></li></ul><p>All patches are submitted now in gerrit.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=113322018-09-13T13:32:03Zpespin
<ul></ul><p>Missing once merged: Update OE recipes.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=113482018-09-14T16:20:37Zpespin
<ul></ul><p>Related OE changes for meta-telephony laforge/nightly pushed to gerrit for review:<br /><pre>
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10948 libosmo-sccp: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10949 osmo-iuh: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10950 osmo-hlr: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10951 osmo-ggsn: Drop untested sysvinit support
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10952 osmo-ggsn: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10953 osmo-sgsn: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10954 osmo-mgw: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10955 osmo-msc: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10956 osmo-bsc: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10957 osmo-sip-connector: handle systemd and cfg files through autotools
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10958 openbsc: Drop untested sysvinit support
remote: https://gerrit.osmocom.org/#/c/meta-telephony/+/10959 openbsc: handle systemd and cfg files through autotools
</pre></p>
<p>Patches for osmo-bts and osmo-pcu in meta-sysmocom-bsp are already merged into laforge/nightly branch.</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=113592018-09-15T09:10:12Zlaforge
<ul></ul><p>OE related patches should all be merged now</p> Cellular Network Infrastructure - Bug #2602: Debian packages: Install configs to /etc/osmocom/ + systemd .service fileshttps://projects.osmocom.org/issues/2602?journal_id=113822018-09-17T08:26:03Zpespin
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>Done, closing</p>