packages: polkit/polkit.spec, polkit/polkit-stdout-and-stderr.patch (NEW) -...
cactus
cactus at pld-linux.org
Mon Nov 28 15:44:11 CET 2011
Author: cactus Date: Mon Nov 28 14:44:11 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 2; add nodebug patch - fix lots of debug info in systemd dmesg
---- Files affected:
packages/polkit:
polkit.spec (1.22 -> 1.23) , polkit-stdout-and-stderr.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/polkit/polkit.spec
diff -u packages/polkit/polkit.spec:1.22 packages/polkit/polkit.spec:1.23
--- packages/polkit/polkit.spec:1.22 Wed Aug 3 18:52:55 2011
+++ packages/polkit/polkit.spec Mon Nov 28 15:44:06 2011
@@ -7,11 +7,12 @@
Summary(pl.UTF-8): Szkielet do definiowania polityki dla komponentów systemowych
Name: polkit
Version: 0.102
-Release: 1
+Release: 2
License: LGPL v2+
Group: Libraries
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
# Source0-md5: a3726bdb9728c103e58f62131e26693a
+Patch0: %{name}-stdout-and-stderr.patch
URL: http://www.freedesktop.org/wiki/Software/PolicyKit
BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1:1.7
@@ -99,6 +100,7 @@
%prep
%setup -q
+%patch0 -p1
%build
%{?with_apidocs:%{__gtkdocize}}
@@ -217,6 +219,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.23 2011/11/28 14:44:06 cactus
+- rel 2; add nodebug patch - fix lots of debug info in systemd dmesg
+
Revision 1.22 2011/08/03 16:52:55 qboosh
- updated to 0.102
================================================================
Index: packages/polkit/polkit-stdout-and-stderr.patch
diff -u /dev/null packages/polkit/polkit-stdout-and-stderr.patch:1.1
--- /dev/null Mon Nov 28 15:44:11 2011
+++ packages/polkit/polkit-stdout-and-stderr.patch Mon Nov 28 15:44:06 2011
@@ -0,0 +1,77 @@
+From 3811e51b81320a574bb31aa64b6af56340012527 Mon Sep 17 00:00:00 2001
+From: David Zeuthen <davidz at redhat.com>
+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 <davidz at redhat.com>
+---
+ 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 <signal.h>
++
++#include <glib-unix.h>
++
+ #include <polkit/polkit.h>
+ #include <polkitbackend/polkitbackend.h>
+
+@@ -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
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/polkit/polkit.spec?r1=1.22&r2=1.23&f=u
More information about the pld-cvs-commit
mailing list