Skip to contentSkip to conversation

use ${PN} for SYSTEMD_SERVICE

PATCH New Chen Qi 1 participant 4 messages Sep 16, 2014

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover use ${PN} for SYSTEMD_SERVICE

The following changes since commit 10df0718d6a626d99beb68cde8d914ee0820d7eb:

classes/populate_sdk_base: enable adding custom commands to SDK install script (2014-09-11 17:44:40 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/multilib-SYSTEMD_SERVICE
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/multilib-SYSTEMD_SERVICE

Chen Qi (3):
acpid: use ${PN} for SYSTEMD_SERVICE
dhcp: use ${PN} for SYSTEMD_SERVICES
volatile-binds: use ${PN} for SYSTEMD_SERVICE

 meta/recipes-bsp/acpid/acpid.inc                   |  3 +--
 meta/recipes-connectivity/dhcp/dhcp.inc            | 10 +++++-----
 meta/recipes-core/volatile-binds/volatile-binds.bb |  2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/3 acpid: use ${PN} for SYSTEMD_SERVICE

We should use ${PN} instead of 'acpid' for SYSTEMD_SERVICE, otherwise we would have the 'installed-not-shipped' QA error if multilib is enabled and we run `bitbake lib32-acpid'.

---
 meta/recipes-bsp/acpid/acpid.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-bsp/acpid/acpid.inc +1 -2
index 9b4c3a5..e015619 100644
@@ -14,8 +14,7 @@ inherit autotools update-rc.d systemd
 INITSCRIPT_NAME = "acpid"
 INITSCRIPT_PARAMS = "defaults"
 
-SYSTEMD_PACKAGES = "acpid"
-SYSTEMD_SERVICE_acpid = "acpid.service"
+SYSTEMD_SERVICE_${PN} = "acpid.service"
 
 do_install_append () {
 	install -d ${D}${sysconfdir}/init.d
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/3 dhcp: use ${PN} for SYSTEMD_SERVICES

In reply to Chen Qi

We should use ${PN} instead of hardcoding 'dhcp' for SYSTEMD_SERVICES, otherwise we would have 'installed-not-shipped' QA error if we are building lib32-dhcp.

---
 meta/recipes-connectivity/dhcp/dhcp.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-connectivity/dhcp/dhcp.inc +5 -5
index a175254..4949e02 100644
@@ -21,12 +21,12 @@ SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
 
 inherit autotools systemd
 
-SYSTEMD_PACKAGES = "dhcp-server dhcp-relay"
-SYSTEMD_SERVICE_dhcp-server = "dhcpd.service"
-SYSTEMD_AUTO_ENABLE_dhcp-server = "disable"
+SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay"
+SYSTEMD_SERVICE_${PN}-server = "dhcpd.service"
+SYSTEMD_AUTO_ENABLE_${PN}-server = "disable"
 
-SYSTEMD_SERVICE_dhcp-relay = "dhcrelay.service"
-SYSTEMD_AUTO_ENABLE_dhcp-relay = "disable"
+SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
+SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
 
 TARGET_CFLAGS += "-D_GNU_SOURCE"
 EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/3 volatile-binds: use ${PN} for SYSTEMD_SERVICE

In reply to Chen Qi

As this recipe inherits allarch, it makes no real difference whether we are using ${PN} or 'volatile-binds'. But using ${PN} would keep the same style with the other recipes in OE.

---
 meta/recipes-core/volatile-binds/volatile-binds.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/volatile-binds/volatile-binds.bb +1 -1
index 4080ff7..694ba1e 100644
@@ -28,7 +28,7 @@ def volatile_systemd_services(d):
         services.append("%s.service" % what[1:].replace("/", "-"))
     return " ".join(services)
 
-SYSTEMD_SERVICE_volatile-binds = "${@volatile_systemd_services(d)}"
+SYSTEMD_SERVICE_${PN} = "${@volatile_systemd_services(d)}"
 
 FILES_${PN} += "${systemd_unitdir}/system/*.service"
 
Signature · 1 line
1.9.1