diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2013-06-06 19:34:26 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-06-20 12:27:59 +0200 |
commit | da51d044a8d9f9dd5c887dc687498fef7c326fa6 (patch) | |
tree | a87b2dc6e5011febaae22da8c63d046a88476f31 /meta-oe/recipes-extended | |
parent | 0368f18b3ff032c57f5bfa93cf1ffa398cc5bcc0 (diff) | |
download | meta-openembedded-da51d044a8d9f9dd5c887dc687498fef7c326fa6.tar.gz |
polkit: update to 0.111
note: this version's rules are written in jscript.
The following tests were performed:
* run-tests for gnome- and xfce-based image
* update a package that installs a new rule to check if the restricted access
rights for /etc/polkit-1/rules.d don't cause trouble
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch | 70 | ||||
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch | 46 | ||||
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit-0.104/obsolete_automake_macros.patch | 23 | ||||
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit/polkit-1_pam.patch (renamed from meta-oe/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch) | 0 | ||||
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit_0.111.bb (renamed from meta-oe/recipes-extended/polkit/polkit_0.104.bb) | 51 |
5 files changed, 34 insertions, 156 deletions
diff --git a/meta-oe/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch b/meta-oe/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch deleted file mode 100644 index c021bfb96..000000000 --- a/meta-oe/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | From c46d2d13eac240d2a609b2dd8fc617ea18a78bfa Mon Sep 17 00:00:00 2001 | ||
2 | From: David Zeuthen <davidz@redhat.com> | ||
3 | Date: Mon, 6 Feb 2012 11:24:53 -0500 | ||
4 | Subject: [PATCH 1/2] PolkitUnixSession: Set error if we cannot find a session for the given pid | ||
5 | |||
6 | Also, don't treat the integer returned by sd_pid_get_session() as a | ||
7 | boolean because that's just confusing. Also, don't confuse memory | ||
8 | supposed to be freed by g_free() and free(3) with each other. See | ||
9 | |||
10 | https://bugzilla.redhat.com/show_bug.cgi?id=787222 | ||
11 | |||
12 | for more details. | ||
13 | |||
14 | Signed-off-by: David Zeuthen <davidz@redhat.com> | ||
15 | --- | ||
16 | |||
17 | Upstream-Status: Accepted | ||
18 | |||
19 | src/polkit/polkitunixsession-systemd.c | 21 ++++++++++++++++----- | ||
20 | 1 files changed, 16 insertions(+), 5 deletions(-) | ||
21 | |||
22 | diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c | ||
23 | index e7e913f..94a7ee4 100644 | ||
24 | --- a/src/polkit/polkitunixsession-systemd.c | ||
25 | +++ b/src/polkit/polkitunixsession-systemd.c | ||
26 | @@ -23,6 +23,7 @@ | ||
27 | # include "config.h" | ||
28 | #endif | ||
29 | |||
30 | +#include <stdlib.h> | ||
31 | #include <string.h> | ||
32 | #include "polkitunixsession.h" | ||
33 | #include "polkitsubject.h" | ||
34 | @@ -450,9 +451,8 @@ polkit_unix_session_initable_init (GInitable *initable, | ||
35 | GError **error) | ||
36 | { | ||
37 | PolkitUnixSession *session = POLKIT_UNIX_SESSION (initable); | ||
38 | - gboolean ret; | ||
39 | - | ||
40 | - ret = FALSE; | ||
41 | + gboolean ret = FALSE; | ||
42 | + char *s; | ||
43 | |||
44 | if (session->session_id != NULL) | ||
45 | { | ||
46 | @@ -461,8 +461,19 @@ polkit_unix_session_initable_init (GInitable *initable, | ||
47 | goto out; | ||
48 | } | ||
49 | |||
50 | - if (!sd_pid_get_session (session->pid, &session->session_id)) | ||
51 | - ret = TRUE; | ||
52 | + if (sd_pid_get_session (session->pid, &s) == 0) | ||
53 | + { | ||
54 | + session->session_id = g_strdup (s); | ||
55 | + free (s); | ||
56 | + ret = TRUE; | ||
57 | + goto out; | ||
58 | + } | ||
59 | + | ||
60 | + g_set_error (error, | ||
61 | + POLKIT_ERROR, | ||
62 | + POLKIT_ERROR_FAILED, | ||
63 | + "No session for pid %d", | ||
64 | + (gint) session->pid); | ||
65 | |||
66 | out: | ||
67 | return ret; | ||
68 | -- | ||
69 | 1.7.2.5 | ||
70 | |||
diff --git a/meta-oe/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch b/meta-oe/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch deleted file mode 100644 index 49f8ce2a0..000000000 --- a/meta-oe/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 8fb8b406bab50c5ef8c5d4f743e3f13924bd5f73 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Zeuthen <davidz@redhat.com> | ||
3 | Date: Mon, 6 Feb 2012 11:26:06 -0500 | ||
4 | Subject: [PATCH 2/2] PolkitUnixSession: Actually return TRUE if a session exists | ||
5 | |||
6 | Also, don't treat the integer returned by sd_session_get_uid() as a | ||
7 | boolean because that's just confusing. | ||
8 | |||
9 | Signed-off-by: David Zeuthen <davidz@redhat.com> | ||
10 | --- | ||
11 | |||
12 | Upstream-Status: Accepted | ||
13 | |||
14 | src/polkit/polkitunixsession-systemd.c | 12 +++++------- | ||
15 | 1 files changed, 5 insertions(+), 7 deletions(-) | ||
16 | |||
17 | diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c | ||
18 | index 94a7ee4..8a8bf65 100644 | ||
19 | --- a/src/polkit/polkitunixsession-systemd.c | ||
20 | +++ b/src/polkit/polkitunixsession-systemd.c | ||
21 | @@ -361,17 +361,15 @@ polkit_unix_session_to_string (PolkitSubject *subject) | ||
22 | |||
23 | static gboolean | ||
24 | polkit_unix_session_exists_sync (PolkitSubject *subject, | ||
25 | - GCancellable *cancellable, | ||
26 | - GError **error) | ||
27 | + GCancellable *cancellable, | ||
28 | + GError **error) | ||
29 | { | ||
30 | PolkitUnixSession *session = POLKIT_UNIX_SESSION (subject); | ||
31 | - gboolean ret; | ||
32 | + gboolean ret = FALSE; | ||
33 | uid_t uid; | ||
34 | |||
35 | - ret = FALSE; | ||
36 | - | ||
37 | - if (!sd_session_get_uid (session->session_id, &uid)) | ||
38 | - ret = FALSE; | ||
39 | + if (sd_session_get_uid (session->session_id, &uid) == 0) | ||
40 | + ret = TRUE; | ||
41 | |||
42 | return ret; | ||
43 | } | ||
44 | -- | ||
45 | 1.7.2.5 | ||
46 | |||
diff --git a/meta-oe/recipes-extended/polkit/polkit-0.104/obsolete_automake_macros.patch b/meta-oe/recipes-extended/polkit/polkit-0.104/obsolete_automake_macros.patch deleted file mode 100644 index 5a6046cc3..000000000 --- a/meta-oe/recipes-extended/polkit/polkit-0.104/obsolete_automake_macros.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59091] | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -Nurd polkit-0.104/configure.ac polkit-0.104/configure.ac | ||
5 | --- polkit-0.104/configure.ac 2012-01-03 18:25:49.000000000 +0200 | ||
6 | +++ polkit-0.104/configure.ac 2013-01-07 03:13:31.862125625 +0200 | ||
7 | @@ -3,7 +3,7 @@ | ||
8 | AC_PREREQ(2.59c) | ||
9 | AC_INIT(polkit, 0.104, http://lists.freedesktop.org/mailman/listinfo/polkit-devel) | ||
10 | AM_INIT_AUTOMAKE(polkit, 0.104) | ||
11 | -AM_CONFIG_HEADER(config.h) | ||
12 | +AC_CONFIG_HEADERS(config.h) | ||
13 | AM_MAINTAINER_MODE | ||
14 | |||
15 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
16 | @@ -24,7 +24,6 @@ | ||
17 | |||
18 | AC_ISC_POSIX | ||
19 | AC_PROG_CC | ||
20 | -AM_PROG_CC_STDC | ||
21 | AC_HEADER_STDC | ||
22 | AM_PROG_LIBTOOL | ||
23 | AC_PROG_MAKE_SET | ||
diff --git a/meta-oe/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch b/meta-oe/recipes-extended/polkit/polkit/polkit-1_pam.patch index 74647efce..74647efce 100644 --- a/meta-oe/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch +++ b/meta-oe/recipes-extended/polkit/polkit/polkit-1_pam.patch | |||
diff --git a/meta-oe/recipes-extended/polkit/polkit_0.104.bb b/meta-oe/recipes-extended/polkit/polkit_0.111.bb index 8a18692fd..33101cf7b 100644 --- a/meta-oe/recipes-extended/polkit/polkit_0.104.bb +++ b/meta-oe/recipes-extended/polkit/polkit_0.111.bb | |||
@@ -5,39 +5,56 @@ LICENSE = "LGPLv2+" | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \ |
6 | file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4" | 6 | file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4" |
7 | 7 | ||
8 | DEPENDS = "expat glib-2.0 intltool-native gobject-introspection-stub" | 8 | DEPENDS = "expat glib-2.0 intltool-native gobject-introspection-stub mozjs" |
9 | |||
10 | inherit autotools gtk-doc pkgconfig useradd systemd | ||
9 | 11 | ||
10 | PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | 12 | PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ |
11 | ${@base_contains('DISTRO_FEATURES','systemd','systemd','consolekit',d)}" | 13 | ${@base_contains('DISTRO_FEATURES','systemd','systemd','consolekit',d)}" |
12 | 14 | ||
13 | PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam" | 15 | PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam" |
14 | PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" | 16 | PACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunitdir=${systemd_unitdir}/system/,--enable-libsystemd-login=no --with-systemdsystemunitdir=,systemd" |
15 | # there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS | 17 | # there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS |
16 | PACKAGECONFIG[consolekit] = ",,,consolekit" | 18 | PACKAGECONFIG[consolekit] = ",,,consolekit" |
17 | 19 | ||
18 | PR = "r12" | ||
19 | |||
20 | PAM_SRC_URI = "file://polkit-1_pam.patch" | 20 | PAM_SRC_URI = "file://polkit-1_pam.patch" |
21 | SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ | 21 | SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ |
22 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | 22 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
23 | file://0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch \ | ||
24 | file://0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch \ | ||
25 | file://obsolete_automake_macros.patch \ | ||
26 | " | 23 | " |
27 | 24 | ||
28 | SRC_URI[md5sum] = "e380b4c6fb1e7bccf854e92edc0a8ce1" | 25 | SRC_URI[md5sum] = "81b116edf986d8e13502929a171f4e0d" |
29 | SRC_URI[sha256sum] = "6b0a13d8381e4a7b7e37c18a54595191b50757e0fcd186cd9918e9ad0f18c7f9" | 26 | SRC_URI[sha256sum] = "02ae544547211b687818c97bcbf19bf6b8b5be7fda93000525a8765c7bed1ea1" |
30 | 27 | ||
31 | EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages --disable-introspection" | 28 | EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages --disable-introspection" |
32 | 29 | ||
33 | inherit autotools gtk-doc pkgconfig | ||
34 | |||
35 | do_install_append() { | 30 | do_install_append() { |
36 | rm -f ${D}${libdir}/${BPN}-1/extensions/*.a | 31 | # see configure.log for more details |
32 | chown root:root ${D}${libdir}/${BPN}-1/polkit-agent-helper-1 | ||
33 | chmod 4755 ${D}${libdir}/${BPN}-1/polkit-agent-helper-1 | ||
34 | |||
35 | chown root:root ${D}${bindir}/pkexec | ||
36 | chmod 4755 ${D}${bindir}/pkexec | ||
37 | |||
38 | chown polkitd:polkitd ${D}${sysconfdir}/${BPN}-1/rules.d | ||
39 | chmod 700 ${D}${sysconfdir}/${BPN}-1/rules.d | ||
40 | |||
41 | chown polkitd:polkitd ${D}${datadir}/${BPN}-1/rules.d | ||
42 | chmod 700 ${D}${datadir}/${BPN}-1/rules.d | ||
37 | } | 43 | } |
38 | 44 | ||
39 | FILES_${PN} += "${libdir}/${BPN}-1/extensions/*.so \ | 45 | PACKAGES =+ "${PN}-examples" |
40 | ${datadir}/${BPN}-1/actions/* \ | 46 | |
41 | ${datadir}/dbus-1/system-services/*" | 47 | FILES_${PN} += " \ |
42 | FILES_${PN}-dbg += "${libdir}/${BPN}-1/extensions/.debug/*.so" | 48 | ${libdir}/${BPN}-1 \ |
43 | FILES_${PN}-dev += "${libdir}/${BPN}-1/extensions/*.la " | 49 | ${datadir}/dbus-1 \ |
50 | ${datadir}/${BPN}-1 \ | ||
51 | " | ||
52 | FILES_${PN}-dbg += "${libdir}/${BPN}-1/.debug" | ||
53 | |||
54 | FILES_${PN}-examples = "${bindir}/*example*" | ||
55 | |||
56 | USERADD_PACKAGES = "${PN}" | ||
57 | USERADD_PARAM_${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd" | ||
58 | |||
59 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
60 | SYSTEMD_AUTO_ENABLE = "disable" | ||