Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5015528ybi; Mon, 3 Jun 2019 23:09:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+i4WxSZ4VWLY7I4s1lXn8o2tLBIlcpDn1EVIxvfrGxiHWW/a1jYq/deSbJzSsmJXB8ozb X-Received: by 2002:a17:90a:35c:: with SMTP id 28mr33545646pjf.110.1559628594978; Mon, 03 Jun 2019 23:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559628594; cv=none; d=google.com; s=arc-20160816; b=FmLtwovXmR3e1OmnpIzFBawAyq7EWBPsnbEAvBns1lmEnPRZ/PsKeVZD7h93WGov6L tiUKRneCCkZW45iFbBlJaKNC1N4FzyQW2yBFyZgdrDB33/websACnXSf8GqTQxEv4PW2 BADZRxncuVIC9+I9mp6oq/8fOcmWOrDVNNAR4gn4Seivr4du+zE5DA8XUgMYWzgBtV5r E8A8XtL+GWMioo/NQzxOf6StxZeTWsuDsTeKwJewHzyR6n1ooyNiB8P0fCX6bT+XIzxw /GinJg+LfJoHhk/S3gRMceDJCgUtmkHP0rI3/B4yk87V/6s2g3DVsWGoE42IaYJsy4C4 N47w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=J7yFpnPjgzdEv2o/wqBGKDSIeHg9SSrDAvEW7HVR2ms=; b=FByOW38j2xgJhnAHpM8ded7Ls8KNTk67657645cHTA0upyHWlLzd/7b06VmHwT3M/3 HfuvHFfp1KOV2mGCBp0E6f8b0e1q7Il3rh3jToUs6560aAS/WRL/WAERYdyxEwTZTJQ7 tnt2pyAKvVXCXuaiqImZiHk3OpeSPSN4YHkRxuSDCOWZwwYwtS4F/Qr+I1Y6hZdBODnW LvxkD7ICgS3eKOkCAh4f9C73G4nchdHl6Z7x17M33gIHiOnXGK/rWF8Go6ApPo0fX8Kh vxGKWoAYIz6OXjjvoh9Z3/h5WJrEKXXDFdNdDk48F6qyMwADEZyBMWrm5XMWOqIAxsv0 mMvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si21444605pgc.141.2019.06.03.23.09.38; Mon, 03 Jun 2019 23:09:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726686AbfFDGHv (ORCPT + 99 others); Tue, 4 Jun 2019 02:07:51 -0400 Received: from mga12.intel.com ([192.55.52.136]:8052 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbfFDGHv (ORCPT ); Tue, 4 Jun 2019 02:07:51 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 23:07:51 -0700 X-ExtLoop1: 1 Received: from ligangti-mobl3.ccr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.84.181]) by fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 23:07:50 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, Inga Stotland Subject: [PATCH BlueZ 1/2 v3] build: Add support for systemd bluetooth-mesh service Date: Mon, 3 Jun 2019 23:07:47 -0700 Message-Id: <20190604060748.3533-2-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190604060748.3533-1-inga.stotland@intel.com> References: <20190604060748.3533-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This adds support for installing systemd bluetooth-mesh service unit and D-Bus service file that references this systemd unit. --- Makefile.mesh | 14 ++++++++++++-- mesh/bluetooth-mesh.service.in | 16 ++++++++++++++++ mesh/org.bluez.mesh.service | 5 +++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 mesh/bluetooth-mesh.service.in create mode 100644 mesh/org.bluez.mesh.service diff --git a/Makefile.mesh b/Makefile.mesh index d494287ab..9cd6e73d6 100644 --- a/Makefile.mesh +++ b/Makefile.mesh @@ -4,6 +4,11 @@ if DATAFILES dbus_DATA += mesh/bluetooth-mesh.conf endif +if SYSTEMD +systemdsystemunit_DATA += mesh/bluetooth-mesh.service +dbussystembus_DATA += mesh/org.bluez.mesh.service +endif + mesh_sources = mesh/mesh.h mesh/mesh.c \ mesh/net-keys.h mesh/net-keys.c \ mesh/mesh-io.h mesh/mesh-io.c \ @@ -32,7 +37,12 @@ libexec_PROGRAMS += mesh/bluetooth-meshd mesh_bluetooth_meshd_SOURCES = $(mesh_sources) mesh/main.c mesh_bluetooth_meshd_LDADD = src/libshared-ell.la $(ell_ldadd) -ljson-c -mesh_bluetooth_meshd_DEPENDENCIES = $(ell_dependencies) src/libshared-ell.la +mesh_bluetooth_meshd_DEPENDENCIES = $(ell_dependencies) src/libshared-ell.la \ + mesh/bluetooth-mesh.service + +EXTRA_DIST += mesh/bluetooth-mesh.conf mesh/bluetooth-mesh.service.in \ + mesh/org.bluez.mesh.service + +CLEANFILES += mesh/bluetooth-mesh.service -EXTRA_DIST += mesh/bluetooth-mesh.conf endif diff --git a/mesh/bluetooth-mesh.service.in b/mesh/bluetooth-mesh.service.in new file mode 100644 index 000000000..76926aa87 --- /dev/null +++ b/mesh/bluetooth-mesh.service.in @@ -0,0 +1,16 @@ +[Unit] +Description=Bluetooth mesh service +ConditionPathIsDirectory=/sys/class/bluetooth + +[Service] +Type=dbus +BusName=org.bluez.mesh +ExecStart=@pkglibexecdir@/bluetooth-meshd +NotifyAccess=main +LimitNPROC=1 +ProtectHome=true +ProtectSystem=full + +[Install] +WantedBy=bluetooth.target +Alias=dbus-org.bluez.mesh.service \ No newline at end of file diff --git a/mesh/org.bluez.mesh.service b/mesh/org.bluez.mesh.service new file mode 100644 index 000000000..a61c44455 --- /dev/null +++ b/mesh/org.bluez.mesh.service @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=org.bluez.mesh +Exec=/bin/false +User=root +SystemdService=dbus-org.bluez.mesh.service -- 2.21.0