diff options
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 0000000000..57338d4713 --- /dev/null +++ b/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 15f439c555289f900eb33111b010bf1266f97edb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jonathan Davies <jpds@protonmail.com> | ||
| 3 | Date: Thu, 25 Nov 2021 15:29:18 +0000 | ||
| 4 | Subject: [PATCH] Reverts the include.h change in | ||
| 5 | 46883f8a1a02fe42040dd8e48aec0ed871545d4d | ||
| 6 | |||
| 7 | Closes: #158 | ||
| 8 | |||
| 9 | Upstream-Status: Backport [https://github.com/radvd-project/radvd/commit/06689f8c06f44c7e87f7ff1d814428f88375b53f] | ||
| 10 | Signed-off-by: Jonathan Davies <jpds@protonmail.com> | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | includes.h | 5 ----- | ||
| 14 | 1 file changed, 5 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/includes.h b/includes.h | ||
| 17 | index 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 2afaa48411..0000000000 --- a/meta-networking/recipes-daemons/radvd/radvd.inc +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | SUMMARY = "IPv6 router advertisement daemon" | ||
| 2 | DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \ | ||
| 3 | listens to router solicitations and sends router \ | ||
| 4 | advertisements as described in RFC 2461, Neighbor \ | ||
| 5 | Discovery for IP Version 6 (IPv6). With these \ | ||
| 6 | advertisements hosts can automatically configure their \ | ||
| 7 | addresses and some other parameters. They also can \ | ||
| 8 | choose a default router based on these advertisements." | ||
| 9 | HOMEPAGE = "http://www.litech.org/radvd/" | ||
| 10 | SECTION = "net" | ||
| 11 | DEPENDS = "flex-native bison-native libdaemon " | ||
| 12 | |||
| 13 | # License is BSD-Style (with advertising clause) but also has an additional 0th clause | ||
| 14 | LICENSE = "radvd" | ||
| 15 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db" | ||
| 16 | |||
| 17 | SRC_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 | |||
| 24 | inherit autotools useradd pkgconfig systemd | ||
| 25 | |||
| 26 | SYSTEMD_SERVICE:${PN} = "radvd.service" | ||
| 27 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 28 | |||
| 29 | do_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 | |||
| 60 | USERADD_PACKAGES = "${PN}" | ||
| 61 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd" | ||
| 62 | |||
| 63 | pkg_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 553987e3d0..f9f810abdd 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 @@ | |||
| 1 | SUMMARY = "IPv6 router advertisement daemon" | ||
| 2 | DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \ | ||
| 3 | listens to router solicitations and sends router \ | ||
| 4 | advertisements as described in RFC 2461, Neighbor \ | ||
| 5 | Discovery for IP Version 6 (IPv6). With these \ | ||
| 6 | advertisements hosts can automatically configure their \ | ||
| 7 | addresses and some other parameters. They also can \ | ||
| 8 | choose a default router based on these advertisements." | ||
| 9 | HOMEPAGE = "http://www.litech.org/radvd/" | ||
| 10 | SECTION = "net" | ||
| 11 | DEPENDS = "flex-native bison-native libdaemon " | ||
| 1 | 12 | ||
| 2 | require radvd.inc | 13 | # License is BSD-Style (with advertising clause) but also has an additional 0th clause |
| 14 | LICENSE = "radvd" | ||
| 15 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db" | ||
| 3 | 16 | ||
| 4 | SRC_URI[md5sum] = "e9c425ac48ecb96ea5ea2912c78969f9" | 17 | SRC_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 | " | ||
| 5 | SRC_URI[sha256sum] = "c36470706fec3a9e6bed394ffea08acaff5dac647848d26b96bb9b9c65d58da0" | 25 | SRC_URI[sha256sum] = "c36470706fec3a9e6bed394ffea08acaff5dac647848d26b96bb9b9c65d58da0" |
| 26 | |||
| 27 | inherit autotools useradd pkgconfig systemd | ||
| 28 | |||
| 29 | SYSTEMD_SERVICE:${PN} = "radvd.service" | ||
| 30 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 31 | |||
| 32 | do_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 | |||
| 63 | USERADD_PACKAGES = "${PN}" | ||
| 64 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd" | ||
| 65 | |||
| 66 | pkg_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 | } | ||
