From 8684061e36cc3895259bb48205df32a7dded0ef4 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 24 Aug 2021 22:02:34 +0200 Subject: [PATCH] Fix the polkit rule for Fedora third party setup It turns out we need to match org.fedoraproject.thirdparty.run as the fedora-third-party script is annotated that way. https://bugzilla.redhat.com/show_bug.cgi?id=1996901 --- ...it-rule-for-Fedora-third-party-setup.patch | 36 +++++++++++++++++++ gnome-initial-setup.spec | 8 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-the-polkit-rule-for-Fedora-third-party-setup.patch diff --git a/0001-Fix-the-polkit-rule-for-Fedora-third-party-setup.patch b/0001-Fix-the-polkit-rule-for-Fedora-third-party-setup.patch new file mode 100644 index 0000000..583ec80 --- /dev/null +++ b/0001-Fix-the-polkit-rule-for-Fedora-third-party-setup.patch @@ -0,0 +1,36 @@ +From c7990f9bb41e9f67b3744d788fe8326dcdb17e6e Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 24 Aug 2021 21:49:07 +0200 +Subject: [PATCH] Fix the polkit rule for Fedora third party setup + +It turns out we need to match org.fedoraproject.thirdparty.run as the +fedora-third-party script is annotated that way. + +https://bugzilla.redhat.com/show_bug.cgi?id=1996901 +--- + data/20-gnome-initial-setup.rules.in | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/data/20-gnome-initial-setup.rules.in b/data/20-gnome-initial-setup.rules.in +index bff0f21..02fd21d 100644 +--- a/data/20-gnome-initial-setup.rules.in ++++ b/data/20-gnome-initial-setup.rules.in +@@ -15,13 +15,8 @@ polkit.addRule(function(action, subject) { + action.id.indexOf('org.freedesktop.accounts.') === 0 || + action.id.indexOf('org.freedesktop.timedate1.') === 0 || + action.id.indexOf('org.freedesktop.realmd.') === 0 || +- action.id.indexOf('com.endlessm.ParentalControls.') === 0); +- +- // For the Software page. Feel free to add rules for your distro here. +- if (action.id === 'org.freedesktop.policykit.exec' && +- action.lookup('program') === '@bindir@/fedora-third-party') { +- actionMatches = true; +- } ++ action.id.indexOf('com.endlessm.ParentalControls.') === 0 || ++ action.id.indexOf('org.fedoraproject.thirdparty.') === 0); + + if (actionMatches) { + if (subject.local) +-- +2.31.1 + diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index aa00f6f..5451614 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -8,7 +8,7 @@ Name: gnome-initial-setup Version: 41~beta -Release: 1%{?dist} +Release: 1%{?dist}.1 Summary: Bootstrapping your OS License: GPLv2+ @@ -16,6 +16,9 @@ URL: https://wiki.gnome.org/Design/OS/InitialSetup Source0: https://download.gnome.org/sources/%{name}/41/%{name}-%{tarball_version}.tar.xz Source1: vendor.conf +# Backported from upstream +Patch0: 0001-Fix-the-polkit-rule-for-Fedora-third-party-setup.patch + BuildRequires: meson BuildRequires: gcc BuildRequires: krb5-devel @@ -104,6 +107,9 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || %{_datadir}/gnome-initial-setup/vendor.conf %changelog +* Tue Aug 24 2021 Kalev Lember - 41~beta-1.1 +- Fix the polkit rule for Fedora third party setup (#1996901) + * Mon Aug 23 2021 Kalev Lember - 41~beta-1 - Update to 41.beta