Accepting request 949263 from home:favogt:dukkit

- Switch from mozjs to duktape:
  * Add duktape-support.patch

Provides the same features as with mozjs, but is *much* smaller both during
build and runtime. Before, installing polkit needed 62.0 MiB, with this it's
just 16.3 MiB. (Tested in an opensuse/tumbleweed container).

I didn't encounter any errors while playing around with it in a Live CD.

OBS-URL: https://build.opensuse.org/request/show/949263
OBS-URL: https://build.opensuse.org/package/show/Base:System/polkit?expand=0&rev=168
This commit is contained in:
Marcus Meissner 2022-01-26 12:54:22 +00:00 committed by Git OBS Bridge
parent 947bf1c982
commit f062ab03fa
3 changed files with 3459 additions and 1 deletions

3449
duktape-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 26 11:44:35 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Switch from mozjs to duktape:
* Add duktape-support.patch
-------------------------------------------------------------------
Tue Jan 25 18:15:16 UTC 2022 - Marcus Meissner <meissner@suse.com>

View File

@ -40,6 +40,8 @@ Patch3: polkit-keyinit.patch
Patch4: polkit-adjust-libexec-path.patch
# PATCH-FIX-UPSTREAM CVE-2021-4034-pkexec-fix.patch meissner@ -- bsc#1194568 VUL-0: CVE-2021-4034: polkit: pkexec Local Privilege Escalation aka pwnkit
Patch5: CVE-2021-4034-pkexec-fix.patch
# PATCH-FIX-UPSTREAM https://gitlab.freedesktop.org/polkit/polkit/-/commit/c7fc4e1b61f0fd82fc697c19c604af7e9fb291a2.patch, without .gitlab-ci.yml (not in the tarball)
Patch6: duktape-support.patch
BuildRequires: gcc-c++
BuildRequires: gtk-doc
BuildRequires: intltool
@ -50,11 +52,11 @@ BuildRequires: pam-devel
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: sysuser-tools
BuildRequires: pkgconfig(duktape) >= 2.2.0
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.32.0
BuildRequires: pkgconfig(gmodule-2.0) >= 2.32.0
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.6.2
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(mozjs-78)
BuildRequires: pkgconfig(systemd)
# gtk-doc drags indirectyly ruby in for one of the helpers. This in turn causes a build cycle.
#!BuildIgnore: ruby
@ -148,6 +150,7 @@ export SUID_LDFLAGS="-z now -pie"
--enable-introspection \
--enable-examples \
--enable-libsystemd-login \
--with-duktape \
%{nil}
%make_build libprivdir=%{_libexecdir}/polkit-1
%sysusers_generate_pre %{SOURCE3} polkit system-user-polkitd.conf