Hi! In order to no longer have python2.7, I've used the patch found on bug #698910 to replace spidermonkey with duktape. I've been using that patch since late april without issue. The patch can also be found in my overlay at https://github.com/billiob/gentoo-overlay/tree/master/sys-auth/polkit
Get it upstream and Gentoo can depend on it.
Works here.
With a small change s/mozjs-60/mozjs-78/ the patch works for polkit-0.118 too.
Vote for that bug. Spidermonkey is just enormous engine to be included in server.
To be honest, I suppose even killing javascript entirely and hardcoding the default polkit rule would work for the majority of users. For one, I don't have any other rules installed. Maybe I should fork it into polkit-shim one day.
The whole of spidermonkey is a bit of an overkill on weak machines, allowing users to choose duktape over the whole spidermonkey + rust + llvm chain would be great. But please don't fully switch over to duktape, at least not before propper testing. I've already tried the pending upstream patch with 0.117 and it didn't fully work for me.
> tt_1 So think I > Mgorny I have removed polkit entirely on my production server (disabled in elogind). Just because any user should not perform server control actions. RarogCmexDell ~ # LC_ALL=C eix elogind [I] sys-auth/elogind Available versions: 243.7 {+acl debug doc +pam +policykit selinux KERNEL="linux"} Installed versions: 243.7(10:51:52 10/18/20)(acl pam -debug -doc -policykit -selinux KERNEL="linux") Homepage: https://github.com/elogind/elogind Description: The systemd project's logind, extracted to a standalone package
I am closing this as an upstream issue. Feel free to notify us if/when it gets accepted there.
*** Bug 829289 has been marked as a duplicate of this bug. ***
Reopening. Upstream has merged duktape support into polkit. It's now optional and consumers can decide whether to use duktape or spidermonkey. https://gitlab.freedesktop.org/polkit/polkit/-/commit/c7fc4e1b61f0fd82fc697c19c604af7e9fb291a2
Created attachment 763734 [details] add duktape support on top of 0.120 Patch coming from upstream.
Created attachment 763739 [details] 0.120-r3 ebuild patch Upgraded from 0.116-r3 to 0.120-r3 here without problem.
This part can be improved: $(usex duktape '-Djs_engine=duktape' '-Djs_engine=mozjs') make it -Djs_engine="$(usex duktape duktape mozjs)"
Created attachment 763740 [details] 0.120-r3 ebuild patch v2, thanks.
Thanks for working on this. The patch adding duktape support is too large to be distributed via FILESDIR. We should probably add a snapshot version bump instead of patching this in anyway.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5f0be7ceb05007e3a309487badb9a098b877952 commit a5f0be7ceb05007e3a309487badb9a098b877952 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-02-19 01:56:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-02-19 02:03:44 +0000 sys-auth/polkit: add 0.120_p20220127 Now with Duktape! Closes: https://bugs.gentoo.org/833122 Closes: https://bugs.gentoo.org/734326 Signed-off-by: Sam James <sam@gentoo.org> profiles/arch/alpha/package.use.force | 6 +- profiles/arch/hppa/package.use.force | 6 ++ profiles/arch/ia64/package.use.force | 6 +- profiles/arch/powerpc/ppc32/package.use.force | 6 ++ profiles/arch/sparc/package.use.force | 6 +- sys-auth/polkit/Manifest | 1 + sys-auth/polkit/metadata.xml | 1 + sys-auth/polkit/polkit-0.120_p20220127.ebuild | 123 ++++++++++++++++++++++++++ 8 files changed, 152 insertions(+), 3 deletions(-)