summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-gnome/recipes-extended/gparted/files/0001-Install-polkit-action-unconditionally-executable-pke.patch47
-rw-r--r--meta-gnome/recipes-extended/gparted/files/gparted_polkit10
-rw-r--r--meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy20
-rw-r--r--meta-gnome/recipes-extended/gparted/gparted_0.33.0.bb40
-rw-r--r--meta-gnome/recipes-extended/gparted/gparted_1.1.0.bb39
5 files changed, 86 insertions, 70 deletions
diff --git a/meta-gnome/recipes-extended/gparted/files/0001-Install-polkit-action-unconditionally-executable-pke.patch b/meta-gnome/recipes-extended/gparted/files/0001-Install-polkit-action-unconditionally-executable-pke.patch
new file mode 100644
index 0000000000..a7fc4d5973
--- /dev/null
+++ b/meta-gnome/recipes-extended/gparted/files/0001-Install-polkit-action-unconditionally-executable-pke.patch
@@ -0,0 +1,47 @@
1From 79fd11f1d8e4827ae8aee03420a5c92038fe4ef5 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Wed, 26 Feb 2020 20:25:06 +0100
4Subject: [PATCH] Install polkit action unconditionally - executable pkexec is
5 not in our sysroot
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Upstream-Status: Inappropriate [OE-specific]
11
12Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
13---
14 configure.ac | 17 +----------------
15 1 file changed, 1 insertion(+), 16 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 43503ac..b339ee5 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -24,22 +24,7 @@ dnl======================
22 dnl Find graphical privilege escalation program
23 dnl======================
24 dnl Check for pkexec >= 0.102 for it's ability to run X11 apps.
25-AM_CONDITIONAL([INSTALL_POLKIT_ACTIONS], false)
26-PKEXEC_REQUIRED_VERSION='0.102'
27-AC_MSG_CHECKING([for pkexec >= $PKEXEC_REQUIRED_VERSION])
28-PKEXEC_REQUIRED_INT=`echo "$PKEXEC_REQUIRED_VERSION" | $AWK -F. '{print $1 * 10000 + $2}'`
29-PKEXEC_VERSION_OUTPUT=`pkexec --version 2> /dev/null` ||
30- AC_MSG_RESULT([not found])
31-if test "x$PKEXEC_VERSION_OUTPUT" != 'x'; then
32- PKEXEC_FOUND_VERSION=`echo "$PKEXEC_VERSION_OUTPUT" | head -1 | cut -d' ' -f3`
33- PKEXEC_FOUND_INT=`echo "$PKEXEC_FOUND_VERSION" | $AWK -F. '{print $1 * 10000 + $2}'`
34- AC_MSG_RESULT([$PKEXEC_FOUND_VERSION found])
35- if test "$PKEXEC_FOUND_INT" -ge "$PKEXEC_REQUIRED_INT"; then
36- GKSUPROG='pkexec --disable-internal-agent'
37- AC_SUBST([GKSUPROG])
38- AM_CONDITIONAL([INSTALL_POLKIT_ACTIONS], true)
39- fi
40-fi
41+AM_CONDITIONAL([INSTALL_POLKIT_ACTIONS], true)
42
43 dnl Check for alternative graphical privilege escalation programs.
44 if test "x$GKSUPROG" = 'x'; then
45--
462.21.0
47
diff --git a/meta-gnome/recipes-extended/gparted/files/gparted_polkit b/meta-gnome/recipes-extended/gparted/files/gparted_polkit
deleted file mode 100644
index feabd0eebb..0000000000
--- a/meta-gnome/recipes-extended/gparted/files/gparted_polkit
+++ /dev/null
@@ -1,10 +0,0 @@
1#!/bin/sh
2
3# polkit installed?
4if [ $(which pkexec) ]; then
5 pkexec --disable-internal-agent "%sbindir%/gparted" "$@"
6else
7 %sbindir%/gparted "$@"
8fi
9
10
diff --git a/meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy b/meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy
deleted file mode 100644
index 77a91923eb..0000000000
--- a/meta-gnome/recipes-extended/gparted/files/org.yoctoproject.pkexec.run-gparted.policy
+++ /dev/null
@@ -1,20 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE policyconfig PUBLIC
3 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
4 "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
5<policyconfig>
6
7 <action id="org.yoctoproject.pkexec.run-gparted">
8 <description>Run the GParted program</description>
9 <message>Authentication is required to run the GParted Partition Editor</message>
10 <icon_name>gparted</icon_name>
11 <defaults>
12 <allow_any>auth_admin</allow_any>
13 <allow_inactive>auth_admin</allow_inactive>
14 <allow_active>auth_admin</allow_active>
15 </defaults>
16 <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
17 <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
18 </action>
19
20</policyconfig>
diff --git a/meta-gnome/recipes-extended/gparted/gparted_0.33.0.bb b/meta-gnome/recipes-extended/gparted/gparted_0.33.0.bb
deleted file mode 100644
index aff994af7d..0000000000
--- a/meta-gnome/recipes-extended/gparted/gparted_0.33.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
1SUMMARY = "A partition editor to graphically manage disk partitions "
2HOMEPAGE = "http://gparted.org/index.php"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
5
6inherit features_check autotools pkgconfig gtk-icon-cache
7
8REQUIRED_DISTRO_FEATURES = "x11"
9
10SRC_URI = " \
11 ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
12 file://org.yoctoproject.pkexec.run-gparted.policy \
13 file://gparted_polkit \
14"
15SRC_URI[md5sum] = "2f481ad34decb7021ca04ca305e79e7d"
16SRC_URI[sha256sum] = "5023b8c983f88a22e65bf6f09a12ea09369defc008981b52ee8b96a3879f81d6"
17
18DEPENDS += "glib-2.0 glib-2.0-native gtkmm parted gnome-doc-utils intltool-native"
19
20do_install_append() {
21 # Add a script which checks if polkit is installed.
22 # If yes: a policy is requested from polkit / otherwise start as usual
23 install ${WORKDIR}/gparted_polkit ${D}${sbindir}
24 sed -i 's:%sbindir%:${sbindir}:g' ${D}${sbindir}/gparted_polkit
25 # relink menu entry to use our script
26 sed -i 's:${sbindir}/gparted:${sbindir}/gparted_polkit:g' ${D}${datadir}/applications/gparted.desktop
27
28 install -d ${D}${datadir}/polkit-1/actions
29 install ${WORKDIR}/org.yoctoproject.pkexec.run-gparted.policy ${D}${datadir}/polkit-1/actions/org.yoctoproject.pkexec.run-gparted.policy
30}
31
32EXTRA_OECONF = "--disable-scrollkeeper --disable-doc"
33
34FILES_${PN} += " \
35 ${datadir}/appdata \
36 ${datadir}/icons \
37 ${datadir}/polkit-1 \
38"
39
40RDEPENDS_${PN} = "dosfstools mtools e2fsprogs"
diff --git a/meta-gnome/recipes-extended/gparted/gparted_1.1.0.bb b/meta-gnome/recipes-extended/gparted/gparted_1.1.0.bb
new file mode 100644
index 0000000000..3aaec3cdd2
--- /dev/null
+++ b/meta-gnome/recipes-extended/gparted/gparted_1.1.0.bb
@@ -0,0 +1,39 @@
1SUMMARY = "A partition editor to graphically manage disk partitions "
2HOMEPAGE = "http://gparted.org/index.php"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
5
6inherit features_check autotools pkgconfig python3native gnome-help gtk-icon-cache
7
8REQUIRED_DISTRO_FEATURES = "x11"
9
10SRC_URI = " \
11 ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
12 file://0001-Install-polkit-action-unconditionally-executable-pke.patch \
13"
14SRC_URI[md5sum] = "0da45cb522d766dfb4886fb3bdbc2634"
15SRC_URI[sha256sum] = "e2fe7b7afbc07e930491c00a05200c2682cc0576ca8f6da87245a000257f5924"
16
17DEPENDS += " \
18 glib-2.0-native \
19 yelp-tools-native \
20 intltool-native \
21 glib-2.0 \
22 gtkmm3 \
23 parted \
24"
25
26FILES_${PN} += " \
27 ${datadir}/appdata \
28 ${datadir}/icons \
29"
30
31PACKAGES += "${PN}-polkit"
32FILES_${PN}-polkit = "${datadir}/polkit-1"
33
34RDEPENDS_${PN} = " \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', '${PN}-polkit', '', d)} \
36 dosfstools \
37 mtools \
38 e2fsprogs \
39"