Patchwork [RFC,meta-oe,27/27] networkmanager: move systemd support to meta-systemd

login
register
mail settings
Submitter Andreas Müller
Date June 10, 2012, 9:47 p.m.
Message ID <1339364820-2880-28-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/29633/
State Accepted
Commit c21e67f8e5ac13d35dd6e4312f19220453c06f0a
Headers show

Comments

Andreas Müller - June 10, 2012, 9:47 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../networkmanager/networkmanager_0.9.2.0.bb       |   13 ++++++-------
 .../networkmanager/networkmanager_0.9.2.0.bbappend |   14 ++++++++++++++
 2 files changed, 20 insertions(+), 7 deletions(-)
 create mode 100644 meta-systemd/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bbappend

Patch

diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
index 221dc2c..e774cb9 100644
--- a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
+++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
@@ -4,10 +4,10 @@  SECTION = "net/misc"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b"
 
-PR = "r6"
+PR = "r7"
 
-DEPENDS = "systemd libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp"
-inherit gnome gettext systemd
+DEPENDS = "libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp"
+inherit gnome gettext
 
 SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.bz2 \
     file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
@@ -19,6 +19,8 @@  SRC_URI[sha256sum] = "a178ed2f0b5a1045ec47b217ea531d0feba9208f6bcfe64b701174a5c1
 
 S = "${WORKDIR}/NetworkManager-${PV}"
 
+SYSTEMD_UNITDIR ??= "no"
+
 EXTRA_OECONF = " \
 		--with-distro=debian \
 		--with-crypto=gnutls \
@@ -26,6 +28,7 @@  EXTRA_OECONF = " \
                 --with-dhclient=${base_sbindir}/dhclient \
                 --with-iptables=${sbindir}/iptables \
                 --with-tests \
+                --with-systemdsystemunitdir=${SYSTEMD_UNITDIR} \
 "
 
 do_configure_prepend() {
@@ -54,9 +57,6 @@  do_install_append () {
 	install -d ${D}/etc/NetworkManager/VPN
 }
 
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE = "NetworkManager.service"
-
 PACKAGES =+ "libnmutil libnmglib libnmglib-vpn ${PN}-tests" 
 
 FILES_libnmutil += "${libdir}/libnm-util.so.*"
@@ -70,7 +70,6 @@  FILES_${PN} += " \
 		${datadir}/polkit-1 \
 		${datadir}/dbus-1 \
 		${base_libdir}/udev/* \
-                ${systemd_unitdir}/system/NetworkManager-wait-online.service \
 "
 
 RRECOMMENDS_${PN} += "iptables"
diff --git a/meta-systemd/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bbappend b/meta-systemd/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bbappend
new file mode 100644
index 0000000..6ae5d75
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bbappend
@@ -0,0 +1,14 @@ 
+PRINC := "${@int(PRINC) + 1}"
+
+inherit systemd
+
+DEPENDS += "systemd"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE = "NetworkManager.service"
+SYSTEMD_UNITDIR = "${systemd_unitdir}/system"
+
+# NetworkManager-wait-online is not catched by systemd.bbclass
+FILES_${PN} += " \
+                ${systemd_unitdir}/system/NetworkManager-wait-online.service \
+"