!10 【Mainline】Update to 0.118

From: @yixiangzhike
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
This commit is contained in:
openeuler-ci-bot 2021-01-25 17:11:37 +08:00 committed by Gitee
commit 6006e064f0
7 changed files with 16 additions and 1497 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,103 +0,0 @@
From 3e1d61868fa8bfc586099302e931433270e5d17d Mon Sep 17 00:00:00 2001
From: Jan Rybar <jrybar@redhat.com>
Date: Tue, 25 Aug 2020 16:38:34 +0000
Subject: [PATCH] Port polkit to mozjs78
---
configure.ac | 4 ++--
src/polkitbackend/polkitbackendjsauthority.cpp | 15 ++++++---------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index eea70fc..c4569f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ AC_PROG_LN_S
AC_SYS_LARGEFILE
AM_PROG_CC_C_O
AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX([14], [], [mandatory])
+AX_CXX_COMPILE_STDCXX([17], [], [mandatory])
# Taken from dbus
AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
@@ -80,7 +80,7 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-PKG_CHECK_MODULES(LIBJS, [mozjs-68])
+PKG_CHECK_MODULES(LIBJS, [mozjs-78])
AC_SUBST(LIBJS_CFLAGS)
AC_SUBST(LIBJS_CXXFLAGS)
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
index 25bd1f9..ca17108 100644
--- a/src/polkitbackend/polkitbackendjsauthority.cpp
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
@@ -49,6 +49,7 @@
#include <js/Realm.h>
#include <js/SourceText.h>
#include <js/Warnings.h>
+#include <js/Array.h>
#include <jsapi.h>
#include "initjs.h" /* init.js */
@@ -367,7 +368,7 @@ load_scripts (PolkitBackendJsAuthority *authority)
static void
reload_scripts (PolkitBackendJsAuthority *authority)
{
- JS::AutoValueArray<1> args(authority->priv->cx);
+ JS::RootedValueArray<1> args(authority->priv->cx);
JS::RootedValue rval(authority->priv->cx);
JS::RootedObject js_polkit(authority->priv->cx, authority->priv->js_polkit->get ());
@@ -482,10 +483,6 @@ polkit_backend_js_authority_constructed (GObject *object)
if (!JS::InitSelfHostedCode (authority->priv->cx))
goto fail;
- JS::ContextOptionsRef (authority->priv->cx)
- .setIon (TRUE)
- .setBaseline (TRUE)
- .setAsmJS (TRUE);
JS::SetWarningReporter(authority->priv->cx, report_error);
JS_SetContextPrivate (authority->priv->cx, authority);
@@ -720,7 +717,7 @@ set_property_strv (PolkitBackendJsAuthority *authority,
elems[n].setNull ();
}
- JS::RootedObject array_object(authority->priv->cx, JS_NewArrayObject (authority->priv->cx, elems));
+ JS::RootedObject array_object(authority->priv->cx, JS::NewArrayObject (authority->priv->cx, elems));
value_jsval = JS::ObjectValue (*array_object);
JS_SetProperty (authority->priv->cx, obj, name, value_jsval);
@@ -1114,7 +1111,7 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
{
PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
GList *ret = NULL;
- JS::AutoValueArray<2> args(authority->priv->cx);
+ JS::RootedValueArray<2> args(authority->priv->cx);
JS::RootedValue rval(authority->priv->cx);
guint n;
GError *error = NULL;
@@ -1218,7 +1215,7 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
{
PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
PolkitImplicitAuthorization ret = implicit;
- JS::AutoValueArray<2> args(authority->priv->cx);
+ JS::RootedValueArray<2> args(authority->priv->cx);
JS::RootedValue rval(authority->priv->cx);
GError *error = NULL;
JS::RootedString ret_jsstr (authority->priv->cx);
@@ -1409,7 +1406,7 @@ js_polkit_spawn (JSContext *cx,
JS::CallArgs args = JS::CallArgsFromVp (js_argc, vp);
array_object = &args[0].toObject();
- if (!JS_GetArrayLength (cx, array_object, &array_len))
+ if (!JS::GetArrayLength (cx, array_object, &array_len))
{
JS_ReportErrorUTF8 (cx, "Failed to get array length");
goto out;
--
1.8.3.1

Binary file not shown.

View File

@ -1,10 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJcwtuMAAoJEIzrMDD/3OJYhGAH/27d2LGj6CaqWgSfJcL7LkKt
gXlS/jG16GpgW4K38KRK5d/3z6SXz0rgsT8LBAOSWdtpil1MFQqO2cUcQGAv5IeF
5vBVgWzCRTF2KPBDgWHuE0QEw0iRBtZL4cOsibj0IiF8JBZ5zCowrUvVF4V6XS7+
4kPYZD24ydY/vz5k6hbwqZfxbqQIOe8vZODzPelfjIDW1E0Zrovp9+KtMCVmSEJz
reUiUc1eY0NpP51NhmwykkZ9D4AZ8fB76uqfELtEd9Yec3I0pvwyvI03eLmD7liC
yI1VEIezPUgJnrGRf8uaVdaLE5TGn7hSIFCGy3xpBd2ZjTKncoed5JtpVDO1WiY=
=1bx+
-----END PGP SIGNATURE-----

BIN
polkit-0.118.tar.gz Normal file

Binary file not shown.

11
polkit-0.118.tar.gz.sign Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEf/t9a9gxR9dChOMXjOswMP/c4lgFAl9YvjgACgkQjOswMP/c
4liXtQgAhApWhRrzwcYuwDuop/35fiGIh5zHNN3hK9ZunIMXXemcX4uQ7K+cen29
5LIGDSlxDYHHRnPOJuMVcYXt62EINhMIQ0kC45m0WJ8RaTDPRDH6YpFacZ/qP1ja
7UkPihZbD0kJlbBJfSNnUw6sRSe6ovxuN0Bhgcz8rPSmSCjOlCjiZokIOifjpFP5
KUBm13BTSEqGZdaZVOi7dn62zaonpyc+lKJ30dLSoZu3EMDD3U5F0pan+xWAfYQw
YjA96mnhABYmvzb0BsEKCPJ7H0brNwXQvc0BbKWNBC6btsxepkvZSNLuZR533SxE
Y7CCOAi/RNKcs/dqTnCXR1PVNaEE6w==
=jUp8
-----END PGP SIGNATURE-----

View File

@ -1,6 +1,6 @@
Name: polkit
Version: 0.116
Release: 6
Version: 0.118
Release: 1
Summary: Define and Handle authorizations tool
License: LGPLv2+
URL: http://www.freedesktop.org/wiki/Software/polkit
@ -8,8 +8,6 @@ Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{
Source1: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz.sign
Patch1: modify-admin-authorization-from-wheel-group-to-root.patch
Patch2: Port-JavaScript-authority-to-mozjs-68.patch
Patch3: Port-polkit-to-mozjs78.patch
BuildRequires: gcc-c++ glib2-devel >= 2.30.0 expat-devel pam-devel gtk-doc intltool
BuildRequires: gobject-introspection-devel systemd systemd-devel pkgconfig(mozjs-78)
@ -126,6 +124,9 @@ exit 0
%{_datadir}/man/man8/*
%changelog
* Thu Jan 21 2021 yixiangzhike <zhangxingliang3@huawei.com> - 0.118-1
- update to 0.118
* Wed Jan 6 2021 Liquor <lirui130@huawei.com> - 0.116-6
- remove 10-shutdown.rules