<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-remsim/+/17365">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">configure.ac + debian: Add systemd service file support<br><br>Closes: OS#4326<br>Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d<br>---<br>M configure.ac<br>M contrib/systemd/Makefile.am<br>M debian/osmo-remsim-bankd.install<br>M debian/osmo-remsim-client.install<br>M debian/osmo-remsim-server.install<br>5 files changed, 26 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configure.ac b/configure.ac</span><br><span>index d2c5e58..0ccb0ba 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -160,6 +160,22 @@</span><br><span>   AC_SUBST([OSMO_GSM_MANUALS_DIR])</span><br><span> fi</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# https://www.freedesktop.org/software/systemd/man/daemon.html</span><br><span style="color: hsl(120, 100%, 40%);">+AC_ARG_WITH([systemdsystemunitdir],</span><br><span style="color: hsl(120, 100%, 40%);">+     [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,</span><br><span style="color: hsl(120, 100%, 40%);">+     [with_systemdsystemunitdir=auto])</span><br><span style="color: hsl(120, 100%, 40%);">+AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [</span><br><span style="color: hsl(120, 100%, 40%);">+     def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     AS_IF([test "x$def_systemdsystemunitdir" = "x"],</span><br><span style="color: hsl(120, 100%, 40%);">+   [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],</span><br><span style="color: hsl(120, 100%, 40%);">+    [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])</span><br><span style="color: hsl(120, 100%, 40%);">+    with_systemdsystemunitdir=no],</span><br><span style="color: hsl(120, 100%, 40%);">+   [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])</span><br><span style="color: hsl(120, 100%, 40%);">+AS_IF([test "x$with_systemdsystemunitdir" != "xno"],</span><br><span style="color: hsl(120, 100%, 40%);">+      [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])</span><br><span style="color: hsl(120, 100%, 40%);">+AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> CFLAGS="$CFLAGS -Wall"</span><br><span> CPPFLAGS="$CPPFLAGS -Wall"</span><br><span> </span><br><span>diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am</span><br><span>index 642920c..2cc64df 100644</span><br><span>--- a/contrib/systemd/Makefile.am</span><br><span>+++ b/contrib/systemd/Makefile.am</span><br><span>@@ -1 +1,8 @@</span><br><span> EXTRA_DIST = osmo-remsim-bankd.service osmo-remsim-client@.service osmo-remsim-server.service</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if HAVE_SYSTEMD</span><br><span style="color: hsl(120, 100%, 40%);">+systemdsystemunit_DATA = \</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo-remsim-bankd.service \</span><br><span style="color: hsl(120, 100%, 40%);">+   osmo-remsim-server.service \</span><br><span style="color: hsl(120, 100%, 40%);">+  osmo-remsim-client@.service</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span>diff --git a/debian/osmo-remsim-bankd.install b/debian/osmo-remsim-bankd.install</span><br><span>index d8168d5..58de089 100644</span><br><span>--- a/debian/osmo-remsim-bankd.install</span><br><span>+++ b/debian/osmo-remsim-bankd.install</span><br><span>@@ -1 +1,2 @@</span><br><span> usr/bin/osmo-remsim-bankd</span><br><span style="color: hsl(120, 100%, 40%);">+lib/systemd/system/osmo-remsim-bankd.service</span><br><span>diff --git a/debian/osmo-remsim-client.install b/debian/osmo-remsim-client.install</span><br><span>index 8e73dc1..85ffb82 100644</span><br><span>--- a/debian/osmo-remsim-client.install</span><br><span>+++ b/debian/osmo-remsim-client.install</span><br><span>@@ -1 +1,2 @@</span><br><span> usr/bin/osmo-remsim-client*</span><br><span style="color: hsl(120, 100%, 40%);">+lib/systemd/system/osmo-remsim-client*</span><br><span>diff --git a/debian/osmo-remsim-server.install b/debian/osmo-remsim-server.install</span><br><span>index f6f14a1..497f7e1 100644</span><br><span>--- a/debian/osmo-remsim-server.install</span><br><span>+++ b/debian/osmo-remsim-server.install</span><br><span>@@ -1 +1,2 @@</span><br><span> usr/bin/osmo-remsim-server</span><br><span style="color: hsl(120, 100%, 40%);">+lib/systemd/system/osmo-remsim-server.service</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-remsim/+/17365">change 17365</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-remsim/+/17365"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-remsim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d </div>
<div style="display:none"> Gerrit-Change-Number: 17365 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>