package/mrouted: bump version and improve integration
cover package/mrouted: bump version and improve integration
Hi! :)
This series updates mrouted to the latest version[1], verifies that the kernel config actually has multicast routing enabled, adds the missing SysV init script, and replaces the hard-coded enabling of RSRR support with a menuconfig option. RSRR really is experimental and should not be enbled by default.
Best regards
/Joachim
[1]: Release notes; https://github.com/troglobit/mrouted/releases/tag/4.2
Joachim Wiberg (6):
package/mrouted: bump to version 4.2
package/mrouted: ensure multicast routing is enabled in kernel package/mrouted: update description a bit, mention oper. requirement package/mrouted: add sysv init script
package/mrouted: for merged usr, install to /usr by default, not / package/mrouted: menuconfig support for enabling rsrr support
package/mrouted/Config.in | 18 +++++++++++ package/mrouted/S41mrouted | 62 ++++++++++++++++++++++++++++++++++++ package/mrouted/mrouted.hash | 6 ++-- package/mrouted/mrouted.mk | 15 +++++++-- 4 files changed, 96 insertions(+), 5 deletions(-) create mode 100755 package/mrouted/S41mrouted
Signature · 1 line
2.25.1
PATCH 1/6 package/mrouted: bump to version 4.2
--- package/mrouted/mrouted.hash | 6 +++--- package/mrouted/mrouted.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
package/mrouted/mrouted.hash +3 -3
@@ -1,6 +1,6 @@ -# From https://github.com/troglobit/mrouted/releases/download/4.1/mrouted-4.1.tar.gz.md5 -md5 e1f9bc0a895a2accae511a44e2a4a6f7 mrouted-4.1.tar.gz +# From https://github.com/troglobit/mrouted/releases/download/4.2/mrouted-4.2.tar.gz.md5 +md5 b921f9e152e039efdac745438ef8362c mrouted-4.2.tar.gz # Locally calculated -sha256 fd4735316f5510dfccfcbed441aa11619b261501dccf9e793a311d618c0843c5 mrouted-4.1.tar.gz +sha256 689541334ea951286054b771640e9d0f26b6a3242ff7f3894a3ef1b680811b34 mrouted-4.2.tar.gz sha256 834f45ed282fd010f354ecc0a50538af519a1cfcc4d2866de3be06982fa9ed29 LICENSE
package/mrouted/mrouted.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -MROUTED_VERSION = 4.1 +MROUTED_VERSION = 4.2 MROUTED_SITE = \ https://github.com/troglobit/mrouted/releases/download/$(MROUTED_VERSION) MROUTED_DEPENDENCIES = host-bison
Signature · 1 line
2.25.1
PATCH 2/6 package/mrouted: ensure multicast routing is enabled in kernel
In reply to Joachim Wiberg--- package/mrouted/mrouted.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/mrouted/mrouted.mk +5 -0
@@ -18,4 +18,9 @@ define MROUTED_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/mrouted.service endef +define MROUTED_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_IP_MULTICAST) + $(call KCONFIG_ENABLE_OPT,CONFIG_IP_MROUTE) +endef + $(eval $(autotools-package))
Signature · 1 line
2.25.1
PATCH 3/6 package/mrouted: update description a bit, mention oper. requirement
In reply to Joachim Wiberg--- package/mrouted/Config.in | 6 ++++++ 1 file changed, 6 insertions(+)
package/mrouted/Config.in +6 -0
@@ -3,5 +3,11 @@ config BR2_PACKAGE_MROUTED depends on BR2_USE_MMU # fork() help An implementation of the DVMRP multicast routing protocol. + Unlike PIM a DVMRP router has a distance vector protocol (like + RIP) built-in to figure out the reverse-path to the multicast + source. This package comes with mrouted and mroutectl. Where + the latter is used to query status and control operation. + + Note: at least two interfaces with MULTICAST flag is requried. http://github.com/troglobit/mrouted
Signature · 1 line
2.25.1
PATCH 4/6 package/mrouted: add sysv init script
In reply to Joachim WibergThe upstream mrouted package comes with its own systemd unit file, but no SysV init script. This script is a modified copy of the sysklogd init script, but set to start after networking.
Note: for mrouted to start it requires at least two MULTICAST capable
interfaces that are UP. This is why an added startup delay of 30 seconds (-w 30) was added, in case the system has DHCP enabled.
--- package/mrouted/S41mrouted | 62 ++++++++++++++++++++++++++++++++++++++ package/mrouted/mrouted.mk | 5 +++ 2 files changed, 67 insertions(+) create mode 100755 package/mrouted/S41mrouted
package/mrouted/S41mrouted new file +62 -0
@@ -0,0 +1,62 @@ +#!/bin/sh + +DAEMON="mrouted" +PIDFILE="/var/run/$DAEMON.pid" + +MROUTED_ARGS="-w 30" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + # shellcheck disable=SC2086 # we need the word splitting + start-stop-daemon -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \ + -- $MROUTED_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +# SIGHUP makes mrouted reload its configuration +reload() { + printf 'Reloading %s: ' "$DAEMON" + start-stop-daemon -K -s HUP -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +case "$1" in + start|stop|restart|reload) + "$1";; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac
package/mrouted/mrouted.mk +5 -0
@@ -13,6 +13,11 @@ MROUTED_LICENSE_FILES = LICENSE MROUTED_CONFIGURE_OPTS = --enable-rsrr MROUTED_CPE_ID_VENDOR = troglobit +define MROUTED_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/mrouted/S41mrouted \ + $(TARGET_DIR)/etc/init.d/S41mrouted +endef + define MROUTED_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 $(@D)/mrouted.service \ $(TARGET_DIR)/usr/lib/systemd/system/mrouted.service
Signature · 1 line
2.25.1
PATCH 5/6 package/mrouted: for merged usr, install to /usr by default, not /
In reply to Joachim Wiberg- Config in /etc
- State files in /var
- Binaries in /usr
--- package/mrouted/mrouted.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/mrouted/mrouted.mk +2 -1
@@ -10,7 +10,8 @@ MROUTED_SITE = \ MROUTED_DEPENDENCIES = host-bison MROUTED_LICENSE = BSD-3-Clause MROUTED_LICENSE_FILES = LICENSE -MROUTED_CONFIGURE_OPTS = --enable-rsrr +MROUTED_CONF_OPTS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var +MROUTED_CONF_OPTS += --enable-rsrr MROUTED_CPE_ID_VENDOR = troglobit define MROUTED_INSTALL_INIT_SYSV
Signature · 1 line
2.25.1
PATCH 5/6 package/mrouted: for merged usr, install to /usr by default, not /
Joachim, All,
On 2021-01-23 11:31 +0100, Joachim Wiberg spake thusly:
Quoted 14 lines
- Config in /etc
- State files in /var
- Binaries in /usrSigned-off-by Joachim Wiberg <[email protected]>--- package/mrouted/mrouted.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)package/mrouted/mrouted.mk +0
-0
package/mrouted/mrouted.mk MROUTED_SITE = \ · line 13
Quoted 5 lines
package/mrouted/mrouted.mk +1
-1@@ -10,7 +10,8 @@ MROUTED_SITE = \ MROUTED_DEPENDENCIES = host-bison MROUTED_LICENSE = BSD-3-Clause MROUTED_LICENSE_FILES = LICENSE -MROUTED_CONFIGURE_OPTS = --enable-rsrr +MROUTED_CONF_OPTS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var
I don't understand why the above is needed, and how it is related to merged-usr as stated in the commit title...
Indeed, the --prefix, --sysconfdir, and --localstatedir passed by the autotools infra are already the values you pass above:
https://git.buildroot.org/buildroot/tree/package/pkg-autotools.mk#n186 ./configure \ --target=$$(GNU_TARGET_NAME) \ --host=$$(GNU_TARGET_NAME) \ --build=$$(GNU_HOST_NAME) \ --prefix=/usr \ --exec-prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \
So I am not sure why you need to pass those explicitly.
Furthermore, I don't see what a merged-usr setup would come into play in this situation...
In the meantime, I've marked this patch as rejected in patchwork. If you still believe it is needed, please respin with additional explanations:
what is the problem that you encountered, and why explicitly passing those options solves it?
Thanks!
Regards,
Yann E. MORIN.
Quoted 11 lines
package/mrouted/mrouted.mk +1
-0+MROUTED_CONF_OPTS += --enable-rsrr MROUTED_CPE_ID_VENDOR = troglobit define MROUTED_INSTALL_INIT_SYSVSignature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 5/6 package/mrouted: for merged usr, install to /usr by default, not /
Hi Yann!
Quoted 15 lines · Yann E. MORIN
On 2021-01-23 11:31 +0100, Joachim Wiberg spake thusly:
package/mrouted/mrouted.mk MROUTED_SITE = \ · line 13
Quoted 2 lines
package/mrouted/mrouted.mk +1
-1-MROUTED_CONFIGURE_OPTS = --enable-rsrr +MROUTED_CONF_OPTS = --prefix=/usr --sysconfdir=/etc --localstatedir=/varI don't understand why the above is needed, and how it is related to merged-usr as stated in the commit title...
Indeed, the --prefix, --sysconfdir, and --localstatedir passed by the autotools infra are already the values you pass above:./configure \ --target=$$(GNU_TARGET_NAME) \ --host=$$(GNU_TARGET_NAME) \ --build=$$(GNU_HOST_NAME) \ --prefix=/usr \ --exec-prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \
Quoted 1 line
So I am not sure why you need to pass those explicitly.
Yeah, I'm equally confused now. Not sure what went wrong with my setp, and I'll go back and check that out right away. This affected the sysklogd patch series as well, unfortunately :-/
Quoted 2 lines
Furthermore, I don't see what a merged-usr setup would come into play in this situation...
Silly conclusion of mine drawn from the above messed up defaults. I think it all comes from the b0rked configure.ac files in my GitHub.
Sorry for the noise!
Quoted 4 lines
In the meantime, I've marked this patch as rejected in patchwork. If you still believe it is needed, please respin with additional explanations:
what is the problem that you encountered, and why explicitly passing those options solves it?
Nope, that's all good with me :)
Thank you so much for taking the time to clean up my patches! <3
Best regards
/Joachim
PATCH 6/6 package/mrouted: menuconfig support for enabling rsrr support
In reply to Joachim Wiberg--- package/mrouted/Config.in | 12 ++++++++++++ package/mrouted/mrouted.mk | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)
package/mrouted/Config.in +12 -0
@@ -11,3 +11,15 @@ config BR2_PACKAGE_MROUTED Note: at least two interfaces with MULTICAST flag is requried. http://github.com/troglobit/mrouted + +if BR2_PACKAGE_MROUTED + +config BR2_PACKAGE_MROUTED_RSRR + bool "enable RSRR for RSVP" + help + Routing Support for Resource Reservation, currently used by RSVP. + This is an EXPERIMENTAL feature. + + For details, see http://tools.ietf.org/html/draft-ietf-rsvp-routing-02 + +endif
package/mrouted/mrouted.mk +1 -1
@@ -11,7 +11,7 @@ MROUTED_DEPENDENCIES = host-bison MROUTED_LICENSE = BSD-3-Clause MROUTED_LICENSE_FILES = LICENSE MROUTED_CONF_OPTS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var -MROUTED_CONF_OPTS += --enable-rsrr +MROUTED_CONF_OPTS += $(if $(BR2_PACKAGE_MROUTED_RSRR),--enable-rsrr,--disable-rsrr) MROUTED_CPE_ID_VENDOR = troglobit define MROUTED_INSTALL_INIT_SYSV
Signature · 1 line
2.25.1
Yann E. MORIN
AppliedPATCH 6/6 package/mrouted: menuconfig support for enabling rsrr support
On 2021-01-23 11:31 +0100, Joachim Wiberg spake thusly:
Quoted 14 lines
Signed-off-by Joachim Wiberg <[email protected]>--- package/mrouted/Config.in | 12 ++++++++++++ package/mrouted/mrouted.mk | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)package/mrouted/Config.in +0
-0@@ -11,3 +11,15 @@ config BR2_PACKAGE_MROUTED Note: at least two interfaces with MULTICAST flag is requried. http://github.com/troglobit/mrouted
package/mrouted/Config.in config BR2_PACKAGE_MROUTED · line 23
Quoted 10 lines
package/mrouted/Config.in +10
-0+ +if BR2_PACKAGE_MROUTED + +config BR2_PACKAGE_MROUTED_RSRR + bool "enable RSRR for RSVP" + help + Routing Support for Resource Reservation, currently used by RSVP. + This is an EXPERIMENTAL feature. + + For details, see http://tools.ietf.org/html/draft-ietf-rsvp-routing-02
I've fixed some minor coding style issue:
$ make check-pacakge
[...]
package/mrouted/Config.in:20: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
package/mrouted/Config.in:23: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
[...]package/mrouted/mrouted.mk MROUTED_DEPENDENCIES = host-bison · line 14
Quoted 11 lines
package/mrouted/Config.in +1
-0+endifpackage/mrouted/mrouted.mk +1
-1@@ -11,7 +11,7 @@ MROUTED_DEPENDENCIES = host-bison MROUTED_LICENSE = BSD-3-Clause MROUTED_LICENSE_FILES = LICENSE MROUTED_CONF_OPTS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var -MROUTED_CONF_OPTS += --enable-rsrr +MROUTED_CONF_OPTS += $(if $(BR2_PACKAGE_MROUTED_RSRR),--enable-rsrr,--disable-rsrr)
I've switched to using the more traditional ifeq-else-endif block.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 10 lines
package/mrouted/mrouted.mk +0
-0MROUTED_CPE_ID_VENDOR = troglobit define MROUTED_INSTALL_INIT_SYSVSignature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 6/6 package/mrouted: menuconfig support for enabling rsrr support
Hi Yann!
Quoted 5 lines · Yann E. MORIN
On 2021-01-23 11:31 +0100, Joachim Wiberg spake thusly:
I've fixed some minor coding style issue:
package/mrouted/Config.in:20: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
package/mrouted/Config.in:23: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
[...]
Oups, thank you! I'll make sure to train my Emacs better :)
Quoted 2 lines
Quoted 1 line
+MROUTED_CONF_OPTS += $(if $(BR2_PACKAGE_MROUTED_RSRR),--enable-rsrr,--disable-rsrr)
I've switched to using the more traditional ifeq-else-endif block.
Thanks! (Copied from another package .mk, felt wrong while doing it)
Quoted 1 line
Applied to master, thanks.
Awesome :)
Best regards
/Joachim
cover package/mrouted: bump version and improve integration
In reply to Joachim WibergJoachim, All,
On 2021-01-23 11:31 +0100, Joachim Wiberg spake thusly:
Quoted 11 lines
Hi! :)
This series updates mrouted to the latest version[1], verifies that the kernel config actually has multicast routing enabled, adds the missing SysV init script, and replaces the hard-coded enabling of RSRR support with a menuconfig option. RSRR really is experimental and should not be enbled by default.
Best regards
/Joachim
Quoted 7 lines
[1]: Release notes; https://github.com/troglobit/mrouted/releases/tag/4.2
Joachim Wiberg (6):
package/mrouted: bump to version 4.2
package/mrouted: ensure multicast routing is enabled in kernel package/mrouted: update description a bit, mention oper. requirement package/mrouted: add sysv init script
Patches 1-4 applied, thanks.
Quoted 1 line
package/mrouted: for merged usr, install to /usr by default, not /
I have concerns and questions about that one, so I'll reply individually to it.
Quoted 1 line
package/mrouted: menuconfig support for enabling rsrr support
Applied too, but I will also comment on it.
Regards,
Yann E. MORIN.
Quoted 14 lines
package/mrouted/Config.in | 18 +++++++++++ package/mrouted/S41mrouted | 62 ++++++++++++++++++++++++++++++++++++ package/mrouted/mrouted.hash | 6 ++-- package/mrouted/mrouted.mk | 15 +++++++-- 4 files changed, 96 insertions(+), 5 deletions(-) create mode 100755 package/mrouted/S41mroutedSignature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'