[gnome-build-meta/alatiera/ducktape-2: 1/3] iso/eos-installer: add another patch for duktape compat
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/alatiera/ducktape-2: 1/3] iso/eos-installer: add another patch for duktape compat
- Date: Tue, 19 Jul 2022 16:00:27 +0000 (UTC)
commit 5cb68cc7a11aa488382ac7ff26f2f6b00353c233
Author: Jordan Petridis <jordan centricular com>
Date: Tue Jul 19 14:19:19 2022 +0300
iso/eos-installer: add another patch for duktape compat
https://github.com/endlessm/eos-installer/pull/101
Close #513
elements/iso/eos-installer.bst | 2 ++
...olkit-rules-tweak-to-be-ecma-5-compatible.patch | 40 ++++++++++++++++++++++
2 files changed, 42 insertions(+)
---
diff --git a/elements/iso/eos-installer.bst b/elements/iso/eos-installer.bst
index bb84a5179..056daeefc 100644
--- a/elements/iso/eos-installer.bst
+++ b/elements/iso/eos-installer.bst
@@ -23,6 +23,8 @@ sources:
path: files/eos-installer/riscv.patch
- kind: patch
path: files/eos-installer/0001-polkit-rules-use-non-sugary-closure-syntax.patch
+- kind: patch
+ path: files/eos-installer/0001-polkit-rules-tweak-to-be-ecma-5-compatible.patch
depends:
- freedesktop-sdk.bst:bootstrap-import.bst
diff --git a/files/eos-installer/0001-polkit-rules-tweak-to-be-ecma-5-compatible.patch
b/files/eos-installer/0001-polkit-rules-tweak-to-be-ecma-5-compatible.patch
new file mode 100644
index 000000000..c8fc99d61
--- /dev/null
+++ b/files/eos-installer/0001-polkit-rules-tweak-to-be-ecma-5-compatible.patch
@@ -0,0 +1,40 @@
+From 2a457b167c34281c45e47c3a081b4837f8b78f2e Mon Sep 17 00:00:00 2001
+From: Jordan Petridis <jordan centricular com>
+Date: Tue, 19 Jul 2022 14:10:39 +0300
+Subject: [PATCH] polkit rules: tweak to be ecma 5 compatible
+
+Or how I lost a weekend debugging..
+
+Polkit rules must be ecma 5 compatible [1]
+
+* Use var instead of const for the array
+* Use indexOf instead of includes
+
+[1] https://gitlab.freedesktop.org/polkit/polkit/-/blob/master/docs/man/polkit.xml#L504
+---
+ eos-installer-data/90-eos-installer.rules | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/eos-installer-data/90-eos-installer.rules b/eos-installer-data/90-eos-installer.rules
+index f06b23e4..e5731ff4 100644
+--- a/eos-installer-data/90-eos-installer.rules
++++ b/eos-installer-data/90-eos-installer.rules
+@@ -43,13 +43,13 @@ polkit.addRule(function(action, subject) {
+ !(subject.user === 'live' && isLiveSystem))
+ return undefined;
+
+- const allowedUdisksActions = [
++ var allowedUdisksActions = [
+ 'org.freedesktop.udisks2.filesystem-mount',
+ 'org.freedesktop.udisks2.open-device',
+ 'org.freedesktop.udisks2.open-device-system',
+ ];
+
+- if (allowedUdisksActions.includes(action.id) ||
++ if (allowedUdisksActions.indexOf(action.id) >= 0 ||
+ (action.id === 'org.freedesktop.policykit.exec' &&
+ action.lookup('program') === '/usr/sbin/eos-repartition-mbr')) {
+ if (subject.local)
+--
+2.36.1
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]