All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Dall'Aglio <jacopo.dallaglio@kynetics.com>
To: openembedded-devel@lists.openembedded.org
Cc: Jacopo Dall'Aglio <jacopo.dallaglio@kynetics.com>
Subject: [meta-networking][v2] netplan: add recipe
Date: Mon,  2 Dec 2019 10:20:03 +0000	[thread overview]
Message-ID: <1575282003-22023-1-git-send-email-jacopo.dallaglio@kynetics.com> (raw)

Canonical's Netplan is a network configuration abstraction renderer written in
Python. It's compatible with NetworkManager and systemd-networkd.

Signed-off-by: Jacopo Dall'Aglio <jacopo.dallaglio@kynetics.com>
---
 .../recipes-connectivity/netplan/netplan_0.98.bb   | 58 ++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/netplan/netplan_0.98.bb

diff --git a/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb b/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
new file mode 100644
index 0000000..860762c
--- /dev/null
+++ b/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
@@ -0,0 +1,58 @@
+SUMMARY = "The network configuration abstraction renderer"
+DESCRIPTION = "Netplan is a utility for easily configuring networking on a \
+linux system. You simply create a YAML description of the required network \
+interfaces and what each should be configured to do. From this description \
+Netplan will generate all the necessary configuration for your chosen renderer \
+tool."
+HOMEPAGE = "https://netplan.io"
+SECTION = "net/misc"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+S = "${WORKDIR}/git"
+SRCREV = "5d22e9d22c4a3724d27b80b0cd9b898ae8f59d2b"
+PV = "0.98+git${SRCPV}"
+
+SRC_URI = " \
+        git://github.com/CanonicalLtd/netplan.git \
+"
+
+DEPENDS = "glib-2.0 libyaml"
+RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python-pyflakes util-linux-libuuid"
+
+inherit pkgconfig systemd
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+EXTRA_OEMAKE = "generate"
+EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}"
+
+do_install() {
+	install -d ${D}${sbindir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan
+	install -m 755 ${S}/generate ${D}${base_libdir}/netplan/
+	install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan
+	install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli
+	install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands
+	install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/
+	ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan
+
+	install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators
+	install -m 644 ${S}/src/netplan-wpa@.service ${D}${systemd_unitdir}/system/
+	ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services
+		install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan
+		install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d
+		install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services
+	fi
+}
+
+SYSTEMD_SERVICE_${PN} = "netplan-wpa@.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGES += "${PN}-dbus"
+
+FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}"
+FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1"
-- 
2.7.4



                 reply	other threads:[~2019-12-02 10:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1575282003-22023-1-git-send-email-jacopo.dallaglio@kynetics.com \
    --to=jacopo.dallaglio@kynetics.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.