Patchwork [meta-oe,2/2] dropbear: move dropbear-systemd to a bbappend

login
register
mail settings
Submitter Otavio Salvador
Date Dec. 9, 2011, 12:04 p.m.
Message ID <0ecbf0fff82e8b143c6f415a01424b58735bba68.1323432272.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/16561/
State Superseded, archived
Headers show

Comments

Otavio Salvador - Dec. 9, 2011, 12:04 p.m.
While on it, the recipe has been updated to use systemd.bbclass and
cleaned up.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../recipes-core/dropbear/dropbear-systemd_v1.bb   |   40 --------------------
 .../{dropbear-systemd => dropbear}/dropbear.socket |    0
 .../dropbear@.service                              |    0
 .../dropbearkey.service                            |    0
 .../dropbear/dropbear_2011.54.bbappend             |   33 ++++++++++++++++
 5 files changed, 33 insertions(+), 40 deletions(-)
 delete mode 100644 meta-oe/recipes-core/dropbear/dropbear-systemd_v1.bb
 rename meta-oe/recipes-core/dropbear/{dropbear-systemd => dropbear}/dropbear.socket (100%)
 rename meta-oe/recipes-core/dropbear/{dropbear-systemd => dropbear}/dropbear@.service (100%)
 rename meta-oe/recipes-core/dropbear/{dropbear-systemd => dropbear}/dropbearkey.service (100%)
 create mode 100644 meta-oe/recipes-core/dropbear/dropbear_2011.54.bbappend

Patch

diff --git a/meta-oe/recipes-core/dropbear/dropbear-systemd_v1.bb b/meta-oe/recipes-core/dropbear/dropbear-systemd_v1.bb
deleted file mode 100644
index b46c0e2..0000000
--- a/meta-oe/recipes-core/dropbear/dropbear-systemd_v1.bb
+++ /dev/null
@@ -1,40 +0,0 @@ 
-DESCRIPTION = "Socket based activation for dropbear ssh server"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
-
-inherit allarch
-
-SRC_URI = "file://dropbearkey.service \
-           file://dropbear@.service \
-           file://dropbear.socket \
-          "
-
-do_configure() {
-	:
-}
-
-do_compile() {
-	:
-}
-
-do_install() {
-	install -d ${D}${base_libdir}/systemd/system
-	install -m 0644 ${WORKDIR}/dropbear*.* ${D}${base_libdir}/systemd/system/
-}
-
-pkg_postinst_${PN} () {
-if test "x$D" != "x"; then
-	exit 1
-fi
-systemctl enable dropbear.socket
-ln -sf /dev/null ${base_libdir}/systemd/system/dropbear.service
-}
-
-pkg_postrm_${PN} () {
-systemctl disable dropbear.socket
-rm -f ${base_libdir}/systemd/system/dropbear.service
-}
-
-RDEPENDS_${PN} = "systemd dropbear"
-FILES_${PN} = "${base_libdir}/systemd/system"
-
diff --git a/meta-oe/recipes-core/dropbear/dropbear-systemd/dropbear.socket b/meta-oe/recipes-core/dropbear/dropbear/dropbear.socket
similarity index 100%
rename from meta-oe/recipes-core/dropbear/dropbear-systemd/dropbear.socket
rename to meta-oe/recipes-core/dropbear/dropbear/dropbear.socket
diff --git a/meta-oe/recipes-core/dropbear/dropbear-systemd/dropbear@.service b/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
similarity index 100%
rename from meta-oe/recipes-core/dropbear/dropbear-systemd/dropbear@.service
rename to meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
diff --git a/meta-oe/recipes-core/dropbear/dropbear-systemd/dropbearkey.service b/meta-oe/recipes-core/dropbear/dropbear/dropbearkey.service
similarity index 100%
rename from meta-oe/recipes-core/dropbear/dropbear-systemd/dropbearkey.service
rename to meta-oe/recipes-core/dropbear/dropbear/dropbearkey.service
diff --git a/meta-oe/recipes-core/dropbear/dropbear_2011.54.bbappend b/meta-oe/recipes-core/dropbear/dropbear_2011.54.bbappend
new file mode 100644
index 0000000..664b6de
--- /dev/null
+++ b/meta-oe/recipes-core/dropbear/dropbear_2011.54.bbappend
@@ -0,0 +1,33 @@ 
+inherit systemd
+
+PR .= ".meta-oe.1"
+
+# look for files in the layer first
+FILESEXTRAPATHS := "${THISDIR}/${PN}"
+
+SRC_URI += "file://dropbearkey.service \
+            file://dropbear@.service \
+            file://dropbear.socket"
+
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE_${PN}-systemd = "dropbear.socket"
+
+do_install_append() {
+	install -d ${D}${base_libdir}/systemd/system
+	install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${base_libdir}/systemd/system/
+	install -m 0644 ${WORKDIR}/dropbear@.service ${D}${base_libdir}/systemd/system/
+	install -m 0644 ${WORKDIR}/dropbear.socket ${D}${base_libdir}/systemd/system/
+}
+
+PACKAGES += "${PN}-systemd"
+
+RDEPENDS_${PN}-systemd += "dropbear"
+FILES_${PN}-systemd = "${base_libdir}/systemd"
+
+pkg_postinst_${PN}-systemd_append() {
+ln -sf /dev/null $D${base_libdir}/systemd/system/dropbear.service
+}
+
+pkg_postrm_${PN}-systemd_append() {
+rm -f ${base_libdir}/systemd/system/dropbear.service
+}