From cdaf292035f92d5183578feb077c74804caf29e2 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 6 Dec 2011 11:03:28 -0500 Subject: [PATCH] Update to upstream release 0.103 Drop upstreamed patch Drop Fedora-specific policy, it is now upstream (fdo #41008) --- .gitignore | 1 + polkit-0.102-neuter-stdout-and-stderr.patch | 77 --------------------- polkit.spec | 64 +++-------------- sources | 2 +- 4 files changed, 11 insertions(+), 133 deletions(-) delete mode 100644 polkit-0.102-neuter-stdout-and-stderr.patch diff --git a/.gitignore b/.gitignore index 4828b02..e25d92f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ polkit-0.98.tar.gz /polkit-0.100.tar.gz /polkit-0.101.tar.gz /polkit-0.102.tar.gz +/polkit-0.103.tar.gz diff --git a/polkit-0.102-neuter-stdout-and-stderr.patch b/polkit-0.102-neuter-stdout-and-stderr.patch deleted file mode 100644 index afe2c7c..0000000 --- a/polkit-0.102-neuter-stdout-and-stderr.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 3811e51b81320a574bb31aa64b6af56340012527 Mon Sep 17 00:00:00 2001 -From: David Zeuthen -Date: Tue, 18 Oct 2011 13:13:16 -0400 -Subject: [PATCH] Add --no-debug option and use this for D-Bus activation - -Signed-off-by: David Zeuthen ---- - data/org.freedesktop.PolicyKit1.service.in | 2 +- - src/polkitd/main.c | 27 ++++++++++++++++++++++++++- - 2 files changed, 27 insertions(+), 2 deletions(-) - -diff --git a/data/org.freedesktop.PolicyKit1.service.in b/data/org.freedesktop.PolicyKit1.service.in -index 5a54ca1..b6cd02b 100644 ---- a/data/org.freedesktop.PolicyKit1.service.in -+++ b/data/org.freedesktop.PolicyKit1.service.in -@@ -1,4 +1,4 @@ - [D-BUS Service] - Name=org.freedesktop.PolicyKit1 --Exec=@libexecdir@/polkitd -+Exec=@libexecdir@/polkitd --no-debug - User=root -diff --git a/src/polkitd/main.c b/src/polkitd/main.c -index 33ea511..b21723f 100644 ---- a/src/polkitd/main.c -+++ b/src/polkitd/main.c -@@ -22,6 +22,9 @@ - #include "config.h" - - #include -+ -+#include -+ - #include - #include - -@@ -33,8 +36,10 @@ static PolkitBackendAuthority *authority = NULL; - static gpointer registration_id = NULL; - static GMainLoop *loop = NULL; - static gboolean opt_replace = FALSE; -+static gboolean opt_no_debug = FALSE; - static GOptionEntry opt_entries[] = { -- {"replace", 0, 0, G_OPTION_ARG_NONE, &opt_replace, "Replace existing daemon", NULL}, -+ {"replace", 'r', 0, G_OPTION_ARG_NONE, &opt_replace, "Replace existing daemon", NULL}, -+ {"no-debug", 'n', 0, G_OPTION_ARG_NONE, &opt_no_debug, "Don't print debug information", NULL}, - {NULL } - }; - -@@ -120,6 +125,26 @@ main (int argc, - goto out; - } - -+ /* If --no-debug is requested don't clutter stdout/stderr etc. -+ */ -+ if (opt_no_debug) -+ { -+ gint dev_null_fd; -+ dev_null_fd = open ("/dev/null", O_RDWR); -+ if (dev_null_fd >= 0) -+ { -+ dup2 (dev_null_fd, STDIN_FILENO); -+ dup2 (dev_null_fd, STDOUT_FILENO); -+ dup2 (dev_null_fd, STDERR_FILENO); -+ close (dev_null_fd); -+ } -+ else -+ { -+ g_warning ("Error opening /dev/null: %m"); -+ } -+ } -+ -+ - loop = g_main_loop_new (NULL, FALSE); - - sigint_id = _g_posix_signal_watch_add (SIGINT, --- -1.7.6.4 - diff --git a/polkit.spec b/polkit.spec index 4fcf580..48b1b04 100644 --- a/polkit.spec +++ b/polkit.spec @@ -1,7 +1,7 @@ Summary: PolicyKit Authorization Framework Name: polkit -Version: 0.102 -Release: 3%{?dist} +Version: 0.103 +Release: 1%{?dist} License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/PolicyKit Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz @@ -23,7 +23,8 @@ Provides: PolicyKit = 0.11 # sufficiently new polkit-gnome package Conflicts: polkit-gnome < 0.97 -Patch0: polkit-0.102-neuter-stdout-and-stderr.patch +Obsoletes: polkit-desktop-policy < 0.103 +Provides: polkit-desktop-policy = 0.103 %description PolicyKit is a toolkit for defining and handling authorizations. @@ -52,22 +53,8 @@ Provides: PolicyKit-docs = 0.11 %description docs Development documentation for PolicyKit. -%package desktop-policy -Summary: PolicyKit policy for desktop users -Group: Development/Libraries -#Requires: %name = %{version}-%{release} -BuildArch: noarch - -%description desktop-policy -This package contains configuration directives to make PolicyKit use -members of the wheel group when administrator authentication is -required. Additionally, the package also contain configuration -directives to allow users in the wheel group to do certain actions -without being interrupted by password dialogs - %prep %setup -q -%patch0 -p1 %build %configure --enable-gtk-doc \ @@ -85,48 +72,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/polkit-1/extensions/*.la %find_lang polkit-1 -### -### BEGIN DESKTOP POLICY CONFIGURATION ### -### - -cat > $RPM_BUILD_ROOT%{_sysconfdir}/polkit-1/localauthority.conf.d/60-desktop-policy.conf << EOF -# This allows users in the wheel group to authenticate as the -# administrator. -# -# DO NOT EDIT THIS FILE, it will be overwritten on update. - -[Configuration] -AdminIdentities=unix-group:wheel -EOF - -cat > $RPM_BUILD_ROOT%{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d/10-desktop-policy.pkla << EOF -# Authorizations/policy for the wheel group. -# -# DO NOT EDIT THIS FILE, it will be overwritten on update. -# -# Allow users in the wheel group to do certain actions without being -# interrupted by password dialogs -# -[Wheel Group Permissions] -Identity=unix-group:wheel -Action=org.gnome.settingsdaemon.datetimemechanism.*;org.kde.kcontrol.kcmclock.save;org.freedesktop.RealtimeKit1.*;org.freedesktop.udisks.filesystem-mount-system-internal;org.freedesktop.hostname1.set-static-hostname -ResultAny=auth_admin -ResultInactive=auth_admin -ResultActive=yes -EOF - -### -### END DESKTOP POLICY CONFIGURATION -### - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%files desktop-policy -%{_sysconfdir}/polkit-1/localauthority.conf.d/60-desktop-policy.conf -%{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d/10-desktop-policy.pkla - %files -f polkit-1.lang %defattr(-,root,root,-) %doc COPYING @@ -175,6 +124,11 @@ EOF %{_datadir}/gtk-doc %changelog +* Tue Dec 06 2011 David Zeuthen 0.103-1%{?dist} +- Update to upstream release 0.103 +- Drop upstreamed patch +- Drop Fedora-specific policy, it is now upstream (fdo #41008) + * Wed Oct 26 2011 Fedora Release Engineering - 0.102-3 - Rebuilt for glibc bug#747377 diff --git a/sources b/sources index e405c6d..e2f7f80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a3726bdb9728c103e58f62131e26693a polkit-0.102.tar.gz +aaacf2ef18774ea8a825a426a7cfe763 polkit-0.103.tar.gz