All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] python2, polkit, duktape, spidermonkey, and Buildroot
@ 2021-07-04  2:28 Adam Duskett
  2021-07-04  9:07 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Duskett @ 2021-07-04  2:28 UTC (permalink / raw)
  To: buildroot

Putting some feelers out here:

The Polkit package currently requires Spidermonkey which in turn
requires Python2.
There has been a pending patch for quite some time to enable ducktape
as an alternative javascript engine which can be found here:
https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35

I hoped that the maintainers would be more responsive to such a patch
and hoped to wait for a new version of polkit with duktape as an
optional backend. However, there seems to be no urgency by the
maintainers of polkit.

This is now a problem.

Spidermonkey, apart from being huge, slow to compile, and a 20MB
shared library (stripped!), which polkit currently requires, relies on
Python2, which as we all know is EOL. Furthermore, python2 is
deprecated in Buildroot, and there is a wiki page on  elinux
(https://elinux.org/Buildroot:Python2Packages) with a list of packages
that still require python2.

There are two major packages that will require some heavy lifting:
- spidermonkey
- nodejs

I have a working build of NodeJS 14, but that's a whole other can of
worms for another email that nobody will want to discuss (hint:
another qemu-wrapper is needed!)

The question I am proposing is this:
Would the buildroot maintainers (and the heavy users I know which I
included on the list) be against a patch series that:
 - Updates polkit to 0.119
 - Changed the build system to meson (autotools can't detect C++17 and
meson works, so it's the path of least resistance.)
  - Add the ducktape patch from above with a slight refactor for the
new commits (Small changes)
  - Drop the spidermonkey package completely and of course, update the
packages that depend on polkit

It's a big ask, and normally I wouldn't want to incorporate a huge
1,000+ LOC patch into a package that's still pending a pull request.
However, with the maintainers lack of cooperation, and insistence that
ducktape acts *exactly* like MozJS, and several people already using
the ducktape patch with 0 issues (Xogium, gentoo users, my employer
Rivian *cough cough*), I am of the opinion that ducktape is more than
stable enough to work just fine.

Not only that, but as far as maintenance goes, polkit releases don't
seem to change a ton of code very often. It took me less than 5
minutes to refactor the ducktape patch and the
0001-make-netgroup-support-optional.patch patch.

Let me know your thoughts. If we decide that such a patch would be
accepted into upstream I will submit one to the mailing list!

Adam

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

* [Buildroot] python2, polkit, duktape, spidermonkey, and Buildroot
  2021-07-04  2:28 [Buildroot] python2, polkit, duktape, spidermonkey, and Buildroot Adam Duskett
@ 2021-07-04  9:07 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-07-04  9:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 3 Jul 2021 19:28:37 -0700
Adam Duskett <aduskett@gmail.com> wrote:

> The Polkit package currently requires Spidermonkey which in turn
> requires Python2.
> There has been a pending patch for quite some time to enable ducktape
> as an alternative javascript engine which can be found here:
> https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35

As I am subscribed to notifications on this merge request, I have been
following the intermittent discussions taking place on this topic. And
indeed, discussions have been sparse, and the polkit maintainers
reaction has not been very supportive, it even feels like they're
trying to find every possible argument or small issue to not merge the
duktape integration. <sarcasm> Somehow they must have taken too much
inspiration from the Buildroot maintainers :-) </sarcasm>

> I hoped that the maintainers would be more responsive to such a patch
> and hoped to wait for a new version of polkit with duktape as an
> optional backend. However, there seems to be no urgency by the
> maintainers of polkit.
> 
> This is now a problem.
> 
> Spidermonkey, apart from being huge, slow to compile, and a 20MB
> shared library (stripped!), which polkit currently requires, relies on
> Python2, which as we all know is EOL. Furthermore, python2 is
> deprecated in Buildroot, and there is a wiki page on  elinux
> (https://elinux.org/Buildroot:Python2Packages) with a list of packages
> that still require python2.

spidermonkey is definitely a nightmare.

> The question I am proposing is this:
> Would the buildroot maintainers (and the heavy users I know which I
> included on the list) be against a patch series that:
>  - Updates polkit to 0.119
>  - Changed the build system to meson (autotools can't detect C++17 and
> meson works, so it's the path of least resistance.)
>   - Add the ducktape patch from above with a slight refactor for the
> new commits (Small changes)
>   - Drop the spidermonkey package completely and of course, update the
> packages that depend on polkit

Considering how long this has been on-going and how messy the
spidermonkey stuff is, I would definitely be OK to make an exception
here, and have those patches on polkit in Buildroot.

But perhaps it would make sense to have a polkit-duktape project on
Github/Gitlab, which forks polkit, and regularly rebases the duktape
integration on top of newer polkit releases? Considering the interest
from other distributions/build systems, this fork could potentially be
used by others, and the mere existence of this fork would be another
pressure on the polkit maintainers to finally act on this.

> Let me know your thoughts. If we decide that such a patch would be
> accepted into upstream I will submit one to the mailing list!

Please submit, but also consider the idea of having a polkit-duktape
project up on Github/Gitlab, that could be a useful alternative.

Thanks for your work on this, it would definitely be great to no longer
have polkit be this massively heavy beast that it is today.

Best regards,

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

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

end of thread, other threads:[~2021-07-04  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04  2:28 [Buildroot] python2, polkit, duktape, spidermonkey, and Buildroot Adam Duskett
2021-07-04  9:07 ` Thomas Petazzoni

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.