All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ibacm: Add systemd service file
@ 2017-07-14 13:26 Benjamin Drung
       [not found] ` <20170714132604.4629-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Drung @ 2017-07-14 13:26 UTC (permalink / raw
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Benjamin Drung

ibacm ships only a sysvinit script but no corresponding systemd unit
file. The RedHat package ships its own systemd unit file. Thus make it
available to all.

Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
---
 debian/ibacm.install                           | 1 +
 ibacm/CMakeLists.txt                           | 5 +++++
 redhat/ibacm.service => ibacm/ibacm.service.in | 4 ++--
 redhat/rdma-core.spec                          | 1 -
 4 files changed, 8 insertions(+), 3 deletions(-)
 rename redhat/ibacm.service => ibacm/ibacm.service.in (63%)

diff --git a/debian/ibacm.install b/debian/ibacm.install
index c8be4a6f..41cf5bad 100644
--- a/debian/ibacm.install
+++ b/debian/ibacm.install
@@ -1,4 +1,5 @@
 etc/init.d/ibacm
+lib/systemd/system/ibacm.service
 usr/bin/ib_acme
 usr/include/infiniband/acm.h
 usr/include/infiniband/acm_prov.h
diff --git a/ibacm/CMakeLists.txt b/ibacm/CMakeLists.txt
index 7eba294b..5e3ea5e2 100644
--- a/ibacm/CMakeLists.txt
+++ b/ibacm/CMakeLists.txt
@@ -64,3 +64,8 @@ rdma_subst_install(FILES "ibacm.init.in"
   DESTINATION "${CMAKE_INSTALL_INITDDIR}"
   RENAME "ibacm"
   PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+
+rdma_subst_install(FILES "ibacm.service.in"
+  DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
+  RENAME ibacm.service
+  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
diff --git a/redhat/ibacm.service b/ibacm/ibacm.service.in
similarity index 63%
rename from redhat/ibacm.service
rename to ibacm/ibacm.service.in
index bb28928c..3879dc45 100644
--- a/redhat/ibacm.service
+++ b/ibacm/ibacm.service.in
@@ -1,12 +1,12 @@
 [Unit]
 Description=Starts the InfiniBand Address Cache Manager daemon
-Documentation=man:ibacm file:/etc/rdma/ibacm_opts.cfg
+Documentation=man:ibacm file:@CMAKE_INSTALL_SYSCONFDIR@/rdma/ibacm_opts.cfg
 Requires=rdma.service
 After=rdma.service opensm.service
 
 [Service]
 Type=forking
-ExecStart=/usr/sbin/ibacm
+ExecStart=@prefix@/sbin/ibacm
 
 [Install]
 WantedBy=network.target
diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index 5cebc251..817013bc 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -271,7 +271,6 @@ install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setu
 # ibacm
 bin/ib_acme -D . -O
 install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/
-install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/
 
 # Delete the package's init.d scripts
 rm -rf %{buildroot}/%{_initrddir}/
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ibacm: Add systemd service file
       [not found] ` <20170714132604.4629-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
@ 2017-07-16 15:20   ` Leon Romanovsky
       [not found]     ` <20170716152013.GC15371-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2017-07-16 15:20 UTC (permalink / raw
  To: Benjamin Drung; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2217 bytes --]

On Fri, Jul 14, 2017 at 03:26:04PM +0200, Benjamin Drung wrote:
> ibacm ships only a sysvinit script but no corresponding systemd unit
> file. The RedHat package ships its own systemd unit file. Thus make it
> available to all.
>
> Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> ---
>  debian/ibacm.install                           | 1 +
>  ibacm/CMakeLists.txt                           | 5 +++++
>  redhat/ibacm.service => ibacm/ibacm.service.in | 4 ++--
>  redhat/rdma-core.spec                          | 1 -
>  4 files changed, 8 insertions(+), 3 deletions(-)
>  rename redhat/ibacm.service => ibacm/ibacm.service.in (63%)
>
> diff --git a/debian/ibacm.install b/debian/ibacm.install
> index c8be4a6f..41cf5bad 100644
> --- a/debian/ibacm.install
> +++ b/debian/ibacm.install
> @@ -1,4 +1,5 @@
>  etc/init.d/ibacm
> +lib/systemd/system/ibacm.service
>  usr/bin/ib_acme
>  usr/include/infiniband/acm.h
>  usr/include/infiniband/acm_prov.h
> diff --git a/ibacm/CMakeLists.txt b/ibacm/CMakeLists.txt
> index 7eba294b..5e3ea5e2 100644
> --- a/ibacm/CMakeLists.txt
> +++ b/ibacm/CMakeLists.txt
> @@ -64,3 +64,8 @@ rdma_subst_install(FILES "ibacm.init.in"
>    DESTINATION "${CMAKE_INSTALL_INITDDIR}"
>    RENAME "ibacm"
>    PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
> +
> +rdma_subst_install(FILES "ibacm.service.in"
> +  DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
> +  RENAME ibacm.service
> +  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
> diff --git a/redhat/ibacm.service b/ibacm/ibacm.service.in
> similarity index 63%
> rename from redhat/ibacm.service
> rename to ibacm/ibacm.service.in
> index bb28928c..3879dc45 100644
> --- a/redhat/ibacm.service
> +++ b/ibacm/ibacm.service.in
> @@ -1,12 +1,12 @@
>  [Unit]
>  Description=Starts the InfiniBand Address Cache Manager daemon
> -Documentation=man:ibacm file:/etc/rdma/ibacm_opts.cfg
> +Documentation=man:ibacm file:@CMAKE_INSTALL_SYSCONFDIR@/rdma/ibacm_opts.cfg

Jason's comment on github:
"We don't have rdma.service in rdma-core, that is a redhat specific target.. It should be stripped out before moving.."

Please resubmit.

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH rdma-core v2] ibacm: Add systemd service file
       [not found]     ` <20170716152013.GC15371-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-07-17  9:42       ` Benjamin Drung
       [not found]         ` <20170717094244.9253-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Drung @ 2017-07-17  9:42 UTC (permalink / raw
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Benjamin Drung

ibacm ships only a sysvinit script but no corresponding systemd unit
file. The RedHat package ships its own systemd unit file. Thus make it
available to all.

The ibacm service depends on sysinit.target (DefaultDependencies=yes)
and the proposed rdma or rdma-load-modules services declare a dependency
Before=sysinit.target. Thus the kernel modules will be loaded before the
sysinit target and the ibacm service does not need to depend on (the not
yet existing) rdma service.

Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
---
 debian/ibacm.install   |  1 +
 ibacm/CMakeLists.txt   |  5 +++++
 ibacm/ibacm.service.in | 11 +++++++++++
 redhat/ibacm.service   | 12 ------------
 redhat/rdma-core.spec  |  1 -
 5 files changed, 17 insertions(+), 13 deletions(-)
 create mode 100644 ibacm/ibacm.service.in
 delete mode 100644 redhat/ibacm.service

diff --git a/debian/ibacm.install b/debian/ibacm.install
index c8be4a6f..41cf5bad 100644
--- a/debian/ibacm.install
+++ b/debian/ibacm.install
@@ -1,4 +1,5 @@
 etc/init.d/ibacm
+lib/systemd/system/ibacm.service
 usr/bin/ib_acme
 usr/include/infiniband/acm.h
 usr/include/infiniband/acm_prov.h
diff --git a/ibacm/CMakeLists.txt b/ibacm/CMakeLists.txt
index 7eba294b..5e3ea5e2 100644
--- a/ibacm/CMakeLists.txt
+++ b/ibacm/CMakeLists.txt
@@ -64,3 +64,8 @@ rdma_subst_install(FILES "ibacm.init.in"
   DESTINATION "${CMAKE_INSTALL_INITDDIR}"
   RENAME "ibacm"
   PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+
+rdma_subst_install(FILES "ibacm.service.in"
+  DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
+  RENAME ibacm.service
+  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
diff --git a/ibacm/ibacm.service.in b/ibacm/ibacm.service.in
new file mode 100644
index 00000000..6cbb203e
--- /dev/null
+++ b/ibacm/ibacm.service.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts the InfiniBand Address Cache Manager daemon
+Documentation=man:ibacm file:@CMAKE_INSTALL_SYSCONFDIR@/rdma/ibacm_opts.cfg
+After=opensm.service
+
+[Service]
+Type=forking
+ExecStart=@prefix@/sbin/ibacm
+
+[Install]
+WantedBy=network.target
diff --git a/redhat/ibacm.service b/redhat/ibacm.service
deleted file mode 100644
index bb28928c..00000000
--- a/redhat/ibacm.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Starts the InfiniBand Address Cache Manager daemon
-Documentation=man:ibacm file:/etc/rdma/ibacm_opts.cfg
-Requires=rdma.service
-After=rdma.service opensm.service
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/ibacm
-
-[Install]
-WantedBy=network.target
diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index 5cebc251..817013bc 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -271,7 +271,6 @@ install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setu
 # ibacm
 bin/ib_acme -D . -O
 install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/
-install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/
 
 # Delete the package's init.d scripts
 rm -rf %{buildroot}/%{_initrddir}/
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH rdma-core v2] ibacm: Add systemd service file
       [not found]         ` <20170717094244.9253-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
@ 2017-07-18 12:53           ` Leon Romanovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2017-07-18 12:53 UTC (permalink / raw
  To: Benjamin Drung; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

On Mon, Jul 17, 2017 at 11:42:44AM +0200, Benjamin Drung wrote:
> ibacm ships only a sysvinit script but no corresponding systemd unit
> file. The RedHat package ships its own systemd unit file. Thus make it
> available to all.
>
> The ibacm service depends on sysinit.target (DefaultDependencies=yes)
> and the proposed rdma or rdma-load-modules services declare a dependency
> Before=sysinit.target. Thus the kernel modules will be loaded before the
> sysinit target and the ibacm service does not need to depend on (the not
> yet existing) rdma service.
>
> Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> ---

Thanks, applied.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-18 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 13:26 [PATCH] ibacm: Add systemd service file Benjamin Drung
     [not found] ` <20170714132604.4629-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2017-07-16 15:20   ` Leon Romanovsky
     [not found]     ` <20170716152013.GC15371-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-17  9:42       ` [PATCH rdma-core v2] " Benjamin Drung
     [not found]         ` <20170717094244.9253-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2017-07-18 12:53           ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.