diff mbox

systemd unit file location...

Message ID 20161020162638.GA28181@obsidianresearch.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Oct. 20, 2016, 4:26 p.m. UTC
On Thu, Oct 20, 2016 at 05:04:35AM +0000, Weiny, Ira wrote:
> Not defined as:
> 
> ./build/CMakeCache.txt:CMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=/usr/local/lib/systemd/system

It is a mistake.

> And you add the "system" in the Debian rules?
> 
> ./debian/iwpmd.install:lib/systemd/system/iwpmd.service
> ./debian/rules:                 -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=/lib/systemd/system \

because systemd requires /lib/systemd when installed and
/usr/local/lib/systemd when in 'local' mode.

It could be wrappered in some kind of "if CMAKE_INSTALL_PREFIX ==
/usr/", but at least RH wants this set from a RPM macro, so I decided
to do the same with Debian.

From 33c80ab9f08814b7614c111aadaaa612cceb6234 Mon Sep 17 00:00:00 2001
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date: Thu, 20 Oct 2016 10:10:43 -0600
Subject: [PATCH] Fix default path for systemd unit files

Missed /system

Reported-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a23aa860e6d3..c4fe705b2234 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,7 +55,7 @@  set(BUILD_LIB ${CMAKE_BINARY_DIR}/lib)
 set(CONFIG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/libibverbs.d")
 set(CMAKE_INSTALL_INITDDIR "${CMAKE_INSTALL_SYSCONFDIR}/init.d"
   CACHE PATH "Location for init.d files")
-set(CMAKE_INSTALL_SYSTEMD_SERVICEDIR "${CMAKE_INSTALL_PREFIX}/lib/systemd"
+set(CMAKE_INSTALL_SYSTEMD_SERVICEDIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
   CACHE PATH "Location for systemd service files")
 
 set(ACM_PROVIDER_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/ibacm"