Skip to contentSkip to conversation

nghttp2: Move to meta-networking

PATCH Superseded Otavio Salvador 3 participants 4 messages Dec 1, 2017

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 nghttp2: Move to meta-networking

The nghttp2 depends on c-ares which is provided by meta-networking layer, so it should be moved there as well.

---

Changes in v2:
- rebase on top of master

 {meta-oe => meta-networking}/recipes-support/nghttp2/nghttp2_1.26.0.bb | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {meta-oe => meta-networking}/recipes-support/nghttp2/nghttp2_1.26.0.bb (100%)
meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb renamed from meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb +0 -0
similarity index 100%
rename from meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb
rename to meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb
Signature · 1 line
2.15.0
#1 lore raw

PATCH v2 2/2 haveged: Add sysvinit support

The haveged daemon is also useful on sysvinit-based systems, so we add a init script for this use-case.

---

Changes in v2:
- rebase on top of master

 .../haveged/haveged/haveged.sysvinit               | 35 ++++++++++++++++++++++
 meta-oe/recipes-extended/haveged/haveged_1.9.1.bb  |  9 +++++-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100755 meta-oe/recipes-extended/haveged/haveged/haveged.sysvinit
meta-oe/recipes-extended/haveged/haveged/haveged.sysvinit new file +35 -0
new file mode 100755
index 000000000..98b8857e7
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+pidfile=/var/run/haveged.pid
+
+# source function library
+. /etc/init.d/functions
+
+case "$1" in
+    start)
+    echo -n "Starting havege entropy daemon... "
+    start-stop-daemon --start --quiet --pidfile $pidfile --name haveged --startas haveged --  -w 1024 -v 0 && success || failure
+    echo
+    ;;
+    stop)
+    echo -n "Stopping havege entropy daemon... "
+    start-stop-daemon --stop --quiet --pidfile $pidfile --name haveged
+    success
+    echo
+    ;;
+    restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+    status)
+    status haveged
+    ;;
+    *)
+    echo "Usage: /etc/init.d/haveged {start|stop|restart|status}"
+    exit 1
+esac
+
+exit 0
meta-oe/recipes-extended/haveged/haveged_1.9.1.bb +8 -1
index bb44c4138..419c85f51 100644
@@ -7,12 +7,13 @@ LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 SRC_URI = "http://www.issihosts.com/haveged/haveged-${PV}.tar.gz \
     file://remove-systemd-unit-503.patch \
+    file://haveged.sysvinit \
 "
 
 SRC_URI[md5sum] = "015ff58cd10607db0e0de60aeca2f5f8"
 SRC_URI[sha256sum] = "9c2363ed9542a6784ff08e247182137e71f2ddb79e8e6c1ac4ad50d21ced3715"
 
-inherit autotools systemd
+inherit autotools update-rc.d systemd
 
 EXTRA_OECONF = "\
     --enable-init=service.redhat \
@@ -21,10 +22,16 @@ EXTRA_OECONF = "\
     --enable-threads=no \
 "
 
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME = "haveged"
+INITSCRIPT_PARAMS_${PN} = "defaults 9"
+
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "haveged.service"
 
 do_install_append() {
+    install -D -m 755 ${WORKDIR}/haveged.sysvinit ${D}${sysconfdir}/init.d/haveged
+
     mkdir -p ${D}${systemd_unitdir}/system
     install -p -m644 ${B}/init.d/haveged.service ${D}${systemd_unitdir}/system
 }
Signature · 1 line
2.15.0
#2 lore raw
In reply to Otavio Salvador
Quoted 3 lines · Otavio Salvador

The nghttp2 depends on c-ares which is provided by meta-networking layer, so it should be moved there as well.

perhaps meta-webserver is better suited for this recipe.

Quoted 22 lines

---

Changes in v2:
- rebase on top of master

 {meta-oe => meta-networking}/recipes-support/nghttp2/nghttp2_1.26.0.bb | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {meta-oe => meta-networking}/recipes-support/nghttp2/nghttp2_1.26.0.bb (100%)
meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb renamed from meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb +0 -1
similarity index 100%
rename from meta-oe/recipes-support/nghttp2/nghttp2_1.26.0.bb
rename to meta-networking/recipes-support/nghttp2/nghttp2_1.26.0.bb
--

2.15.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 5 lines · Khem Raj
Quoted 2 lines · Otavio Salvador

The nghttp2 depends on c-ares which is provided by meta-networking layer, so it should be moved there as well.

perhaps meta-webserver is better suited for this recipe.

The root reason to move to meta-networking is because it requires c-ares. If meta-webserver already depends on meta-networking I can move it there otherwise we will have a hard dependency.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750