summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-29 16:26:37 -0700
committerKhem Raj <raj.khem@gmail.com>2022-08-30 00:14:58 -0700
commitc52b9e1a93b82ca481255dd660f29077a1b00840 (patch)
treeb1371f6a81242e66df41f2387be596e47f889229 /meta-networking
parent2bbccfe1aeed9114d1146f57d7fdb0811a19f9ec (diff)
downloadmeta-openembedded-c52b9e1a93b82ca481255dd660f29077a1b00840.tar.gz
radvd: Fix build on musl
Backport a patch from upstream to fix musl builds Merged inc file into bb file, makes it easy to use devtool Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch32
-rw-r--r--meta-networking/recipes-daemons/radvd/radvd.inc67
-rw-r--r--meta-networking/recipes-daemons/radvd/radvd_2.19.bb69
3 files changed, 99 insertions, 69 deletions
diff --git a/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch b/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch
new file mode 100644
index 000000000..57338d471
--- /dev/null
+++ b/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch
@@ -0,0 +1,32 @@
1From 15f439c555289f900eb33111b010bf1266f97edb Mon Sep 17 00:00:00 2001
2From: Jonathan Davies <jpds@protonmail.com>
3Date: Thu, 25 Nov 2021 15:29:18 +0000
4Subject: [PATCH] Reverts the include.h change in
5 46883f8a1a02fe42040dd8e48aec0ed871545d4d
6
7Closes: #158
8
9Upstream-Status: Backport [https://github.com/radvd-project/radvd/commit/06689f8c06f44c7e87f7ff1d814428f88375b53f]
10Signed-off-by: Jonathan Davies <jpds@protonmail.com>
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 includes.h | 5 -----
14 1 file changed, 5 deletions(-)
15
16diff --git a/includes.h b/includes.h
17index ef30b10..c528c86 100644
18--- a/includes.h
19+++ b/includes.h
20@@ -76,12 +76,7 @@
21 #include <sys/sysctl.h>
22 #endif
23
24-#if !defined(__GLIBC__) && defined(linux)
25-#include <linux/if.h>
26-#define IF_NAMESIZE IFNAMSIZ
27-#else
28 #include <net/if.h>
29-#endif
30
31 #ifdef HAVE_NET_IF_DL_H
32 #include <net/if_dl.h>
diff --git a/meta-networking/recipes-daemons/radvd/radvd.inc b/meta-networking/recipes-daemons/radvd/radvd.inc
deleted file mode 100644
index 2afaa4841..000000000
--- a/meta-networking/recipes-daemons/radvd/radvd.inc
+++ /dev/null
@@ -1,67 +0,0 @@
1SUMMARY = "IPv6 router advertisement daemon"
2DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \
3listens to router solicitations and sends router \
4advertisements as described in RFC 2461, Neighbor \
5Discovery for IP Version 6 (IPv6). With these \
6advertisements hosts can automatically configure their \
7addresses and some other parameters. They also can \
8choose a default router based on these advertisements."
9HOMEPAGE = "http://www.litech.org/radvd/"
10SECTION = "net"
11DEPENDS = "flex-native bison-native libdaemon "
12
13# License is BSD-Style (with advertising clause) but also has an additional 0th clause
14LICENSE = "radvd"
15LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db"
16
17SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \
18 file://radvd.init \
19 file://radvd.service \
20 file://volatiles.03_radvd \
21 file://radvd.default \
22 file://radvd.conf"
23
24inherit autotools useradd pkgconfig systemd
25
26SYSTEMD_SERVICE:${PN} = "radvd.service"
27SYSTEMD_AUTO_ENABLE = "disable"
28
29do_install:append () {
30 install -m 0755 -d ${D}${sysconfdir}/init.d \
31 ${D}${sysconfdir}/default/volatiles \
32 ${D}${docdir}/radvd
33 # Install init script and volatiles
34 install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd
35 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd
36 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd
37 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd
38 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd
39
40 install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd
41
42 # Install systemd service files
43 install -d ${D}${systemd_unitdir}/system
44 install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system
45 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \
46 -e 's#@SBINDIR@#${sbindir}#g' \
47 -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service
48
49 # Install default environment file
50 install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd
51
52 # Documentation
53 for i in radvd.conf.example README; do \
54 install -m 0644 ${S}/$i ${D}${docdir}/radvd; \
55 done
56
57 install -m 0644 ${WORKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf
58}
59
60USERADD_PACKAGES = "${PN}"
61USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd"
62
63pkg_postinst:${PN} () {
64 if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then
65 /etc/init.d/populate-volatile.sh update
66 fi
67}
diff --git a/meta-networking/recipes-daemons/radvd/radvd_2.19.bb b/meta-networking/recipes-daemons/radvd/radvd_2.19.bb
index 553987e3d..f9f810abd 100644
--- a/meta-networking/recipes-daemons/radvd/radvd_2.19.bb
+++ b/meta-networking/recipes-daemons/radvd/radvd_2.19.bb
@@ -1,5 +1,70 @@
1SUMMARY = "IPv6 router advertisement daemon"
2DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \
3listens to router solicitations and sends router \
4advertisements as described in RFC 2461, Neighbor \
5Discovery for IP Version 6 (IPv6). With these \
6advertisements hosts can automatically configure their \
7addresses and some other parameters. They also can \
8choose a default router based on these advertisements."
9HOMEPAGE = "http://www.litech.org/radvd/"
10SECTION = "net"
11DEPENDS = "flex-native bison-native libdaemon "
1 12
2require radvd.inc 13# License is BSD-Style (with advertising clause) but also has an additional 0th clause
14LICENSE = "radvd"
15LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db"
3 16
4SRC_URI[md5sum] = "e9c425ac48ecb96ea5ea2912c78969f9" 17SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \
18 file://radvd.init \
19 file://radvd.service \
20 file://volatiles.03_radvd \
21 file://radvd.default \
22 file://radvd.conf \
23 file://0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch \
24 "
5SRC_URI[sha256sum] = "c36470706fec3a9e6bed394ffea08acaff5dac647848d26b96bb9b9c65d58da0" 25SRC_URI[sha256sum] = "c36470706fec3a9e6bed394ffea08acaff5dac647848d26b96bb9b9c65d58da0"
26
27inherit autotools useradd pkgconfig systemd
28
29SYSTEMD_SERVICE:${PN} = "radvd.service"
30SYSTEMD_AUTO_ENABLE = "disable"
31
32do_install:append () {
33 install -m 0755 -d ${D}${sysconfdir}/init.d \
34 ${D}${sysconfdir}/default/volatiles \
35 ${D}${docdir}/radvd
36 # Install init script and volatiles
37 install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd
38 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd
39 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd
40 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd
41 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd
42
43 install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd
44
45 # Install systemd service files
46 install -d ${D}${systemd_unitdir}/system
47 install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system
48 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \
49 -e 's#@SBINDIR@#${sbindir}#g' \
50 -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service
51
52 # Install default environment file
53 install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd
54
55 # Documentation
56 for i in radvd.conf.example README; do \
57 install -m 0644 ${S}/$i ${D}${docdir}/radvd; \
58 done
59
60 install -m 0644 ${WORKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf
61}
62
63USERADD_PACKAGES = "${PN}"
64USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd"
65
66pkg_postinst:${PN} () {
67 if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then
68 /etc/init.d/populate-volatile.sh update
69 fi
70}