All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mstpd: new package
@ 2021-09-20 19:24 Francois Perrad
  2021-09-26 21:42 ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Francois Perrad @ 2021-09-20 19:24 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/mstpd/Config.in  |  9 +++++++++
 package/mstpd/mstpd.hash |  3 +++
 package/mstpd/mstpd.mk   | 13 +++++++++++++
 5 files changed, 27 insertions(+)
 create mode 100644 package/mstpd/Config.in
 create mode 100644 package/mstpd/mstpd.hash
 create mode 100644 package/mstpd/mstpd.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 50e36de39..d8d077e51 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -967,6 +967,7 @@ F:	package/lsqlite3/
 F:	package/lua*
 F:	package/lzlib/
 F:	package/moarvm/
+F:	package/mstpd/
 F:	package/netsurf/
 F:	package/perl*
 F:	package/pkg-perl.mk
diff --git a/package/Config.in b/package/Config.in
index 4d323d440..5f4960bce 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2208,6 +2208,7 @@ menu "Networking applications"
 	source "package/mosquitto/Config.in"
 	source "package/mrouted/Config.in"
 	source "package/mrp/Config.in"
+	source "package/mstpd/Config.in"
 	source "package/mtr/Config.in"
 	source "package/nbd/Config.in"
 	source "package/ncftp/Config.in"
diff --git a/package/mstpd/Config.in b/package/mstpd/Config.in
new file mode 100644
index 000000000..5fe585977
--- /dev/null
+++ b/package/mstpd/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_MSTPD
+	bool "mstpd"
+	help
+	  Multiple Spanning Tree Protocol Daemon.
+	  This package provides a user-space daemon which replaces
+	  the STP handling that is built into the Linux kernel Ethernet
+	  bridge and adds support for RSTP and PVST+.
+
+	  https://github.com/mstpd/mstpd
diff --git a/package/mstpd/mstpd.hash b/package/mstpd/mstpd.hash
new file mode 100644
index 000000000..7fb88c898
--- /dev/null
+++ b/package/mstpd/mstpd.hash
@@ -0,0 +1,3 @@
+# locally computed
+sha256  91a1862548b5b509caa2e96e5fb9912bc98d4d58cc98e99a577824735756c14d  mstpd-0.0.9.tar.gz
+sha256  c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42  LICENSE
diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
new file mode 100644
index 000000000..0e5c9714c
--- /dev/null
+++ b/package/mstpd/mstpd.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# mstpd
+#
+################################################################################
+
+MSTPD_VERSION = 0.0.9
+MSTPD_SITE = $(call github,mstpd,mstpd,$(MSTPD_VERSION))
+MSTPD_AUTORECONF = YES
+MSTPD_LICENSE = GPL-2.0
+MSTPD_LICENSE_FILES = LICENSE
+
+$(eval $(autotools-package))
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/mstpd: new package
  2021-09-20 19:24 [Buildroot] [PATCH] package/mstpd: new package Francois Perrad
@ 2021-09-26 21:42 ` Arnout Vandecappelle
  2021-09-27  8:02   ` Vadym Kochan
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2021-09-26 21:42 UTC (permalink / raw)
  To: Francois Perrad, buildroot; +Cc: Vadim Kochan, Serhiy Boiko

  Hi Francois,

On 20/09/2021 21:24, Francois Perrad wrote:
[snip]
> diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
> new file mode 100644
> index 000000000..0e5c9714c
> --- /dev/null
> +++ b/package/mstpd/mstpd.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# mstpd
> +#
> +################################################################################
> +
> +MSTPD_VERSION = 0.0.9
> +MSTPD_SITE = $(call github,mstpd,mstpd,$(MSTPD_VERSION))
> +MSTPD_AUTORECONF = YES
> +MSTPD_LICENSE = GPL-2.0

  There is actually hmac_md5.c that has a different license. So I added that 
one, and I added it to LICENSE_FILES as well and to the hash file.

> +MSTPD_LICENSE_FILES = LICENSE
> +


  Vadim (in Cc) posted the same package a year ago. He had

+# mstpd requires that it is installed into /sbin, not /usr/sbin
+MSTPD_CONF_OPTS = \
+	--sbindir=/sbin

which he later explained with "it should point to /sbin because
Linux's bridge implementation calls /sbin/bridge-stp in case the STP
handling is delegated to user space." - which sounds pretty feasible to me...

  Did you test this with STP and with a non-unified /usr?

  I've anyway alreayd applied as-is to master (with the license fix), but please 
check if the --sbindir is needed.

  Regards,
  Arnout

> +$(eval $(autotools-package))
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/mstpd: new package
  2021-09-26 21:42 ` Arnout Vandecappelle
@ 2021-09-27  8:02   ` Vadym Kochan
  2021-09-28  8:08     ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Vadym Kochan @ 2021-09-27  8:02 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: buildroot, Francois Perrad, Vadim Kochan, Serhiy Boiko


Hi All,

Arnout Vandecappelle <arnout@mind.be> writes:

>   Hi Francois,
>
> On 20/09/2021 21:24, Francois Perrad wrote:
> [snip]
>> diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
>> new file mode 100644
>> index 000000000..0e5c9714c
>> --- /dev/null
>> +++ b/package/mstpd/mstpd.mk
>> @@ -0,0 +1,13 @@
>> +################################################################################
>> +#
>> +# mstpd
>> +#
>> +################################################################################
>> +
>> +MSTPD_VERSION = 0.0.9
>> +MSTPD_SITE = $(call github,mstpd,mstpd,$(MSTPD_VERSION))
>> +MSTPD_AUTORECONF = YES
>> +MSTPD_LICENSE = GPL-2.0
>
>   There is actually hmac_md5.c that has a different license. So I added that 
> one, and I added it to LICENSE_FILES as well and to the hash file.
>
>> +MSTPD_LICENSE_FILES = LICENSE
>> +
>
>
>   Vadim (in Cc) posted the same package a year ago. He had
>
> +# mstpd requires that it is installed into /sbin, not /usr/sbin
> +MSTPD_CONF_OPTS = \
> +	--sbindir=/sbin
>
> which he later explained with "it should point to /sbin because
> Linux's bridge implementation calls /sbin/bridge-stp in case the STP
> handling is delegated to user space." - which sounds pretty feasible to me...
>

This is can be checked at least by this:

    https://elixir.bootlin.com/linux/v5.15-rc3/source/net/bridge/br_private.h#L51

So may be just create /sbin/bridge-stp link.

>   Did you test this with STP and with a non-unified /usr?
>
>   I've anyway alreayd applied as-is to master (with the license fix), but please 
> check if the --sbindir is needed.
>
>   Regards,
>   Arnout
>
>> +$(eval $(autotools-package))
>> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/mstpd: new package
  2021-09-27  8:02   ` Vadym Kochan
@ 2021-09-28  8:08     ` Arnout Vandecappelle
  0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2021-09-28  8:08 UTC (permalink / raw)
  To: Vadym Kochan; +Cc: buildroot, Francois Perrad, Vadim Kochan, Serhiy Boiko



On 27/09/2021 10:02, Vadym Kochan wrote:
> 
> Hi All,
> 
> Arnout Vandecappelle <arnout@mind.be> writes:
> 
>>    Hi Francois,
>>
>> On 20/09/2021 21:24, Francois Perrad wrote:
>> [snip]
>>> diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
>>> new file mode 100644
>>> index 000000000..0e5c9714c
>>> --- /dev/null
>>> +++ b/package/mstpd/mstpd.mk
>>> @@ -0,0 +1,13 @@
>>> +################################################################################
>>> +#
>>> +# mstpd
>>> +#
>>> +################################################################################
>>> +
>>> +MSTPD_VERSION = 0.0.9
>>> +MSTPD_SITE = $(call github,mstpd,mstpd,$(MSTPD_VERSION))
>>> +MSTPD_AUTORECONF = YES
>>> +MSTPD_LICENSE = GPL-2.0
>>
>>    There is actually hmac_md5.c that has a different license. So I added that
>> one, and I added it to LICENSE_FILES as well and to the hash file.
>>
>>> +MSTPD_LICENSE_FILES = LICENSE
>>> +
>>
>>
>>    Vadim (in Cc) posted the same package a year ago. He had
>>
>> +# mstpd requires that it is installed into /sbin, not /usr/sbin
>> +MSTPD_CONF_OPTS = \
>> +	--sbindir=/sbin
>>
>> which he later explained with "it should point to /sbin because
>> Linux's bridge implementation calls /sbin/bridge-stp in case the STP
>> handling is delegated to user space." - which sounds pretty feasible to me...
>>
> 
> This is can be checked at least by this:
> 
>      https://elixir.bootlin.com/linux/v5.15-rc3/source/net/bridge/br_private.h#L51
> 
> So may be just create /sbin/bridge-stp link.

  I think the --sbindir approach is cleaner. Although I see that openwrt in fact 
uses custom install commands and puts mstpd and mstpctl in /usr/sbin, and 
bridge-stp in /sbin.

  Also note that a symlink is tricky in the unified /usr case, because then 
/sbin/bridge-stp and /usr/sbin/bridge-stp are the same file.

  Regards,
  Arnout

>>    Did you test this with STP and with a non-unified /usr?
>>
>>    I've anyway alreayd applied as-is to master (with the license fix), but please
>> check if the --sbindir is needed.
>>
>>    Regards,
>>    Arnout
>>
>>> +$(eval $(autotools-package))
>>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mstpd: new package
  2020-09-22 19:58 ` Thomas Petazzoni
@ 2020-09-22 20:16   ` vadim4j at gmail.com
  0 siblings, 0 replies; 7+ messages in thread
From: vadim4j at gmail.com @ 2020-09-22 20:16 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Tue, Sep 22, 2020 at 09:58:18PM +0200, Thomas Petazzoni wrote:
> Hello Vadym,
> 
> Thanks for this contribution. See below for a number of comments.
> 
> On Sat, 19 Sep 2020 23:19:04 +0300
> Vadym Kochan <vadim4j@gmail.com> wrote:
> 
> > diff --git a/package/mstpd/Config.in b/package/mstpd/Config.in
> > new file mode 100644
> > index 0000000000..ac921b0d2b
> > --- /dev/null
> > +++ b/package/mstpd/Config.in
> > @@ -0,0 +1,11 @@
> > +config BR2_PACKAGE_MSTPD
> > +	bool "mstpd"
> > +	select BR2_PACKAGE_BASH # init
> 
Might be a mistake.

> Are you sure bash is needed? For what? I don't see an init script being
> installed.
> 
> > diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
> > new file mode 100644
> > index 0000000000..49dc769509
> > --- /dev/null
> > +++ b/package/mstpd/mstpd.mk
> > @@ -0,0 +1,20 @@
> > +################################################################################
> > +#
> > +# mstpd
> > +#
> > +################################################################################
> > +
> > +MSTPD_VERSION = 0.0.8
> > +MSTPD_SOURCE = $(MSTPD_VERSION).tar.gz
> > +MSTPD_SITE = https://github.com/mstpd/mstpd/archive
> 
> Please use the github macro, since they haven't uploaded their own
> tarball.
> 
> > +MSTPD_LICENSE = GPL-2.0
> 
> The license is actually GPL-2.0+
> 
> > +MSTPD_LICENSE_FILES = LICENSE
> > +MSTPD_AUTORECONF = YES
> > +
> > +# mstpd requires that it is installed into /sbin, not /usr/sbin
> > +MSTPD_CONF_OPTS = \
> > +	--prefix=/ \
> > +	--exec-prefix=/ \
> > +	--sbindir=/sbin
> 
> This doesn't work, because it puts the stuff that normally go into
> /usr/share into /share, and so the manpages are still on the target as
> they are not located at the usual /usr/share/man location.
> 
> ??? share
> ??? ??? doc
> ??? ??? ??? mstpd
> ??? ???     ??? README.VLANs
> ??? ??? man
> ???     ??? man5
> ???     ??? ??? mstpctl-utils-interfaces.5.gz
> ???     ??? man8
> ???         ??? mstpctl.8.gz
> 
> Would it be possible instead to fix things so that it can be installed
> into /usr/sbin ?

I think you are right about the default prefix and --exec-prefix, but
regarding --sbindir it looks like it should point to /sbin because
Linux's bridge implementation calls /sbin/bridge-stp in case the STP
handling is delegated to user space.

> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Regards,
Vadym Kochan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mstpd: new package
  2020-09-19 20:19 Vadym Kochan
@ 2020-09-22 19:58 ` Thomas Petazzoni
  2020-09-22 20:16   ` vadim4j at gmail.com
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2020-09-22 19:58 UTC (permalink / raw)
  To: buildroot

Hello Vadym,

Thanks for this contribution. See below for a number of comments.

On Sat, 19 Sep 2020 23:19:04 +0300
Vadym Kochan <vadim4j@gmail.com> wrote:

> diff --git a/package/mstpd/Config.in b/package/mstpd/Config.in
> new file mode 100644
> index 0000000000..ac921b0d2b
> --- /dev/null
> +++ b/package/mstpd/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_MSTPD
> +	bool "mstpd"
> +	select BR2_PACKAGE_BASH # init

Are you sure bash is needed? For what? I don't see an init script being
installed.

> diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
> new file mode 100644
> index 0000000000..49dc769509
> --- /dev/null
> +++ b/package/mstpd/mstpd.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# mstpd
> +#
> +################################################################################
> +
> +MSTPD_VERSION = 0.0.8
> +MSTPD_SOURCE = $(MSTPD_VERSION).tar.gz
> +MSTPD_SITE = https://github.com/mstpd/mstpd/archive

Please use the github macro, since they haven't uploaded their own
tarball.

> +MSTPD_LICENSE = GPL-2.0

The license is actually GPL-2.0+

> +MSTPD_LICENSE_FILES = LICENSE
> +MSTPD_AUTORECONF = YES
> +
> +# mstpd requires that it is installed into /sbin, not /usr/sbin
> +MSTPD_CONF_OPTS = \
> +	--prefix=/ \
> +	--exec-prefix=/ \
> +	--sbindir=/sbin

This doesn't work, because it puts the stuff that normally go into
/usr/share into /share, and so the manpages are still on the target as
they are not located at the usual /usr/share/man location.

??? share
??? ??? doc
??? ??? ??? mstpd
??? ???     ??? README.VLANs
??? ??? man
???     ??? man5
???     ??? ??? mstpctl-utils-interfaces.5.gz
???     ??? man8
???         ??? mstpctl.8.gz

Would it be possible instead to fix things so that it can be installed
into /usr/sbin ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mstpd: new package
@ 2020-09-19 20:19 Vadym Kochan
  2020-09-22 19:58 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Vadym Kochan @ 2020-09-19 20:19 UTC (permalink / raw)
  To: buildroot

From: Serhiy Boiko <serhiy.boiko@plvision.eu>

Add MSTPD (Multiple Spanning Tree Protocol Daemon) an open source
user-space daemon licensed under GPLv2.

Signed-off-by: Serhiy Boiko <serhiy.boiko@plvision.eu>
Signed-off-by: Vadym Kochan <vadim4j@gmail.com>
---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/mstpd/Config.in  | 11 +++++++++++
 package/mstpd/mstpd.hash |  3 +++
 package/mstpd/mstpd.mk   | 20 ++++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 package/mstpd/Config.in
 create mode 100644 package/mstpd/mstpd.hash
 create mode 100644 package/mstpd/mstpd.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 506e675587..15708d26ed 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2654,6 +2654,7 @@ N:	Vadim Kochan <vadim4j@gmail.com>
 F:	package/brcm-patchram-plus/
 F:	package/frr/
 F:	package/gettext-tiny/
+F:	package/mstpd/
 F:	package/tinyssh/
 
 N:	Valentin Korenblit <valentinkorenblit@gmail.com>
diff --git a/package/Config.in b/package/Config.in
index 2f30252891..737c0695c0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2145,6 +2145,7 @@ menu "Networking applications"
 	source "package/mosquitto/Config.in"
 	source "package/mrouted/Config.in"
 	source "package/mrp/Config.in"
+	source "package/mstpd/Config.in"
 	source "package/mtr/Config.in"
 	source "package/nbd/Config.in"
 	source "package/ncftp/Config.in"
diff --git a/package/mstpd/Config.in b/package/mstpd/Config.in
new file mode 100644
index 0000000000..ac921b0d2b
--- /dev/null
+++ b/package/mstpd/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_MSTPD
+	bool "mstpd"
+	select BR2_PACKAGE_BASH # init
+	depends on BR2_USE_MMU  # bash
+	help
+	  Multiple Spanning Tree Protocol Daemon
+
+	  MSTPD is an open source user-space daemon licensed
+	  under GPLv2.
+
+	  https://github.com/mstpd/mstpd
diff --git a/package/mstpd/mstpd.hash b/package/mstpd/mstpd.hash
new file mode 100644
index 0000000000..6cb6e2f166
--- /dev/null
+++ b/package/mstpd/mstpd.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 dd6492039368efff0bd13b3f9c8bb32d859ebfe258a70ef23b2163c4b6c35f0c  0.0.8.tar.gz
+sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42  LICENSE
diff --git a/package/mstpd/mstpd.mk b/package/mstpd/mstpd.mk
new file mode 100644
index 0000000000..49dc769509
--- /dev/null
+++ b/package/mstpd/mstpd.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# mstpd
+#
+################################################################################
+
+MSTPD_VERSION = 0.0.8
+MSTPD_SOURCE = $(MSTPD_VERSION).tar.gz
+MSTPD_SITE = https://github.com/mstpd/mstpd/archive
+MSTPD_LICENSE = GPL-2.0
+MSTPD_LICENSE_FILES = LICENSE
+MSTPD_AUTORECONF = YES
+
+# mstpd requires that it is installed into /sbin, not /usr/sbin
+MSTPD_CONF_OPTS = \
+	--prefix=/ \
+	--exec-prefix=/ \
+	--sbindir=/sbin
+
+$(eval $(autotools-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-28  8:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 19:24 [Buildroot] [PATCH] package/mstpd: new package Francois Perrad
2021-09-26 21:42 ` Arnout Vandecappelle
2021-09-27  8:02   ` Vadym Kochan
2021-09-28  8:08     ` Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2020-09-19 20:19 Vadym Kochan
2020-09-22 19:58 ` Thomas Petazzoni
2020-09-22 20:16   ` vadim4j at gmail.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.