Closed vmihalko closed 1 year ago
In GitLab by @yetist on Sep 7, 2019, 08:56
added 3 commits
polkit:master
In GitLab by @Aduskett on Feb 11, 2020, 21:48
I agree with this. Duktape has two major advantages:
It is much smaller than mozjs MozJS takes up 20Mb of space! On an embedded system that is absolutely huge.
It does not require python2 to build
In GitLab by @hhoffstaette on Feb 20, 2020, 14:58
This patch is fantastic! I've applied this to my polkit-0.116 package on Gentoo and it immediately got rid of spidermonkey & python-2, and everything still works fine. Thank You! :rocket:
Edit: the ebuild is here.
In GitLab by @tpetazzoni on Feb 20, 2020, 18:37
This is definitely something that would be awesome for embedded systems. In the context of the Buildroot project, the mozjs dependency is really annoying, both from a maintenance point of view, but also from a storage/memory consumption point of view.
In GitLab by @ross on Feb 20, 2020, 19:05
:thumbsup: from OpenEmbedded for the same reasons as Buildroot (which is why I was wondering if its actually feasible to swap JS for Lua)
In GitLab by @tpetazzoni on Feb 20, 2020, 19:17
In this specific case, I believe duktape is an even lighter solution than Lua, and it preserves compatibility with existing polkit installations.
In GitLab by @jrybar on Feb 21, 2020, 16:04
added 13 commits
polkit:master
In GitLab by @ferion11 on Feb 23, 2020, 13:17
Thanks! I am already using the patch on Gentoo Linux (on my ebuilds). And it's working really well. I hope the upstream here merge this PR too.
In GitLab by @jrybar on Mar 16, 2020, 15:02
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 248
Shouldn't there be a retval check here?
In GitLab by @jrybar on Mar 16, 2020, 15:04
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 386
original spidermonkey code created g_main_loop for authority. Why is it now required here?
In GitLab by @jrybar on Mar 16, 2020, 15:05
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 408
cast to (g_pointer*) removed here (diff from original code). Many other cases below (at the end) in the code.
In GitLab by @jrybar on Mar 16, 2020, 15:07
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 651
retval check here? I prefer sanity checks in auth software. This entire function presumes TRUE from this line.
In GitLab by @jrybar on Mar 16, 2020, 15:09
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 685
this function returns TRUE only!
In GitLab by @jrybar on Mar 16, 2020, 15:10
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 694
retval check here, please.
In GitLab by @jrybar on Mar 16, 2020, 15:32
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 1171
typecast missing (as from original).
Also at 1186, 1200, 1214, 1243... you name it.
In GitLab by @jrybar on Mar 16, 2020, 15:56
This MR is awesome! Especially the reduction of code by more than 30%! And duktape seems so simple in comparison to SpiderMonkey!
Thanks, Xiaotian!
I'll be glad to merge it as soon as the polkitbackend tests return to working state. So far it alsays starts looping in polkitbackendjsauthoritytest-wrapper.py. I'm trying to figure out why now.
In GitLab by @jrybar on Mar 30, 2020, 17:10
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 688
Actually there used to be entire implementation of runaway_script_killer between the undeleted (!!) comment lines. Without it, the test for infinite loops in uploaded scripts fails, hence entire "make check" fails.
This functionality MUST be returned back, so bad-written (or well-crafted, you name it) user rules do not hang entire polkit!!
@yetist, please, can you take care of it?
In GitLab by @danyspin97 on Jun 13, 2020, 21:24
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 1042
From innetgr
man page:
These functions are not in POSIX.1-2001, but setnetgrent(), endnetgrent(), getnetgrent(), and innetgr() are available on most UNIX systems. getnetgrent_r() is not widely available on other systems.
innetgr is not POSIX and therefore is not available on musl based systems.
In GitLab by @danyspin97 on Jun 13, 2020, 21:30
Any news on this MR?
In GitLab by @jrybar on Jun 15, 2020, 17:14
As I wrote in my previous comments related to code review, so far, this MR breaks tests and makes polkit sensitive to incorrect .rules files. I let it sink in so the author had time to revert/reimplement appropriate part of code this MR removes. I may find time to reimplement it myself after finishing !48 which seems greatly anticipated (and which throws segfaults on Fedora vagrantbox for some reason).
In GitLab by @jrybar on Jul 23, 2020, 15:22
@yetist Hello and thank you again for your merge request.
Can we please discuss some changes that need to be done so this MR can be merged?
Namely the following things are really required:
Thank you for your reply. Looking forward to further discussion.
In GitLab by @zx2c4 on Sep 3, 2020, 20:50
Any updates to this? Seems like the original author might have abandoned this, but @jrybar - you expressed some interest in reimplementing it?
In GitLab by @XVilka on Sep 4, 2020, 07:49
This work is important for the eliminating Python 2 since the spidermonkey is not in a hurry to switch to Python 3 despite it being out there for more than 10 years.
In GitLab by @jrybar on Sep 4, 2020, 12:58
@yetist Hello and thank you again for your merge request.
Can we please discuss some changes that need to be done so this MR can be merged?
Namely the following things are really required:
Thank you for your reply. Looking forward to further discussion.
In GitLab by @jrybar on Sep 4, 2020, 13:00
I agree, but this MR is not gonna make it into master in this condition. Some parts must be rewritten and TBH I have tons of other work on polkit before I get to this one.
In GitLab by @hhoffstaette on Sep 4, 2020, 15:40
Jan, yetist's profile indicates zero activity since the original posting, and it's reasonable to assume he's gone AWOL.
In GitLab by @ferion11 on Sep 4, 2020, 15:53
@hhoffstaette , the Wu Xiaotian (yetist) is active on github, being part of 2 organizations (isoft-linux and mate-desktop). He's probably just out of time too. I wanted to make these corrections too, but I'm also not in a different situation with regard to free time (yet using it now in the form of patch).
In GitLab by @Arnaudv6 on Nov 5, 2020, 18:54
I have no idea what would be pros nor what work it'd actually require.
But with recent headlines I'd like to mention https://bellard.org/quickjs/bench.html
In GitLab by @fzatlouk on Nov 17, 2020, 23:36
@XVilka SpiderMonkey doesn't require Python 2 since version 78. Take a look at Fedora spec: https://src.fedoraproject.org/rpms/mozjs78/blob/master/f/mozjs78.spec
It's just python3 and python3-six .
In GitLab by @mattst88 on Nov 17, 2020, 23:44
Yes, but now it requires Rust and LLVM, each of which is about 3x the size of Python2.7 on my system, for comparison.
In GitLab by @yetist on Nov 22, 2020, 04:43
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 248
changed this line in version 4 of the diff
In GitLab by @yetist on Nov 22, 2020, 04:43
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 651
changed this line in version 4 of the diff
In GitLab by @yetist on Nov 22, 2020, 04:43
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 694
changed this line in version 4 of the diff
In GitLab by @yetist on Nov 22, 2020, 04:43
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 1171
changed this line in version 4 of the diff
In GitLab by @yetist on Nov 22, 2020, 04:43
added 26 commits
polkit:master
In GitLab by @yetist on Nov 22, 2020, 04:58
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 248
Return value check added here.
In GitLab by @yetist on Nov 22, 2020, 04:58
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 651
Return value check added here
In GitLab by @yetist on Nov 22, 2020, 04:59
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 1171
fixed
In GitLab by @yetist on Nov 22, 2020, 05:03
Commented on src/polkitbackend/polkitbackendduktapeauthority.c line 1042
The original master branch code has already used innetgr, so there is no need to modify it here.
In GitLab by @yetist on Nov 22, 2020, 05:48
added 1 commit
In GitLab by @yetist on Nov 22, 2020, 06:19
added 7 commits
In GitLab by @yetist on Nov 22, 2020, 11:18
added 5 commits
In GitLab by @yetist on Nov 22, 2020, 11:49
added 1 commit
In GitLab by @corvus on Nov 23, 2020, 03:43
@yetist It's good to see you back! We're all rooting for you and appreciate your work. :-)
In GitLab by @asavah on Nov 23, 2020, 12:37
@yetist Yes, this is awesome, please get this merged! Getting rid of bloated mozjs is a must.
In GitLab by @karlson2k on Nov 24, 2020, 13:07
@yetist Is code ready to be reviewed? I can't wait for it to be merged as spidermonkey and its dependencies bloat my gentoo installation.
In GitLab by @jrybar on Nov 25, 2020, 10:44
Well it sure is desired to remove mozjs from dependencies, yet the two major problems with this MR haven't been fixed. Those are:
Anyway many thanks go to @yetist for his recent commits. I'm glad you haven't abandoned this MR, as this change is really exciting.
In GitLab by @mbiebl on Dec 1, 2020, 18:36
- code duplication
Just curious: Why not switch to duktape wholesale and remove mozjs? Is there a reason why you'd want to keep both, i.e. situations where you would prefer a mozjs-based polkit over a duktape-based polkit?
In GitLab by @jrybar on Dec 2, 2020, 08:19
To give distros time to make the change and to give option if there are too many problems with duktape as new technology.
In GitLab by @mbiebl on Dec 2, 2020, 13:35
To give distros time to make the change and to give option if there are too many problems with duktape as new technology.
That seems reasonable for a transition period. I'm more interested, what the long term plans are. Do you plan to maintain both backends in parallel in the future or will you eventually remove one of the backends again.
In GitLab by @yetist on Jul 24, 2019, 17:53
Merges dev-duktape -> master
I don't know if there is a chance to use duktape as the js backend for polkit.
I saw this email on the mailing list.
But some things have changed now:
https://pkgs.org/download/duktape
--with-duktape
to enable build with duktape. If you don't add this option, it will still compile with mozjs as before.