* [gentoo-commits] gentoo-x86 commit in sys-auth/consolekit/files: consolekit-shutdown-reboot-without-policies.patch consolekit-udev-acl-install_to_usr.patch consolekit-0.4.5-polkit-automagic.patch consolekit-cleanup_console_tags.patch
@ 2012-05-14 12:53 Samuli Suominen (ssuominen)
0 siblings, 0 replies; only message in thread
From: Samuli Suominen (ssuominen) @ 2012-05-14 12:53 UTC (permalink / raw
To: gentoo-commits
ssuominen 12/05/14 12:53:19
Added: consolekit-shutdown-reboot-without-policies.patch
consolekit-udev-acl-install_to_usr.patch
consolekit-0.4.5-polkit-automagic.patch
consolekit-cleanup_console_tags.patch
Log:
Use snapshot from upstream git to clean up patchset.
(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)
Revision Changes Path
1.1 sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch?rev=1.1&content-type=text/plain
Index: consolekit-shutdown-reboot-without-policies.patch
===================================================================
From: Romain Perier <mrpouet@gentoo.org>
Date: Sat, 24 Oct 2009 18:43:43 +0200
Subject: [PATCH] Be able to shutdown or reboot even without polkit or RBAC supports
Ck does NOTHING at the origin if its built without polkit or RBAC supports, except
display a warning using g_warning() (which does not make sense).
The trick is to to call do_stop()/do_restart() in the #else directive :)
--- src/ck-manager.c
+++ src/ck-manager.c
@@ -1131,6 +1131,7 @@
check_rbac_permissions (manager, context, RBAC_SHUTDOWN_KEY, do_restart);
#else
g_warning ("Compiled without PolicyKit or RBAC support!");
+ do_restart(manager, context);
#endif
return TRUE;
@@ -1207,6 +1208,7 @@
check_rbac_permissions (manager, context, RBAC_SHUTDOWN_KEY, do_stop);
#else
g_warning ("Compiled without PolicyKit or RBAC support!");
+ do_stop(manager, context);
#endif
return TRUE;
1.1 sys-auth/consolekit/files/consolekit-udev-acl-install_to_usr.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-udev-acl-install_to_usr.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-udev-acl-install_to_usr.patch?rev=1.1&content-type=text/plain
Index: consolekit-udev-acl-install_to_usr.patch
===================================================================
http://bugs.gentoo.org/398049
--- tools/Makefile.am
+++ tools/Makefile.am
@@ -144,11 +144,10 @@
$(NULL)
if ENABLE_UDEV_ACL
-udevdir = $(UDEVDIR)
udevrulesdir = $(UDEVDIR)/rules.d
dist_udevrules_DATA = 70-udev-acl.rules
-udev_PROGRAMS = udev-acl
+libexec_PROGRAMS = udev-acl
udev_acl_SOURCES = udev-acl.c
udev_acl_LDADD = $(UDEV_ACL_LIBS)
@@ -156,7 +155,9 @@
install-exec-hook:
mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d
- ln -sf $(UDEVDIR)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck
+ mkdir -p $(DESTDIR)$(UDEVDIR)
+ ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck
+ ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(UDEVDIR)/udev-acl
endif
EXTRA_DIST = \
1.1 sys-auth/consolekit/files/consolekit-0.4.5-polkit-automagic.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-0.4.5-polkit-automagic.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-0.4.5-polkit-automagic.patch?rev=1.1&content-type=text/plain
Index: consolekit-0.4.5-polkit-automagic.patch
===================================================================
http://bugs.freedesktop.org/show_bug.cgi?id=47587
--- configure.ac
+++ configure.ac
@@ -56,10 +56,21 @@
gthread-2.0 >= $GLIB_REQUIRED_VERSION
)
-PKG_CHECK_MODULES(POLKIT,
- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
- have_polkit=yes,
- have_polkit=no)
+AC_ARG_ENABLE([polkit],
+ AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support (default auto)]),
+ enable_polkit=$enableval,
+ enable_polkit=auto)
+
+if test "x$enable_polkit" != "xno"; then
+ PKG_CHECK_MODULES(POLKIT,
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+ have_polkit=yes,
+ have_polkit=no)
+ if test "x$enable_polkit" = "xyes" -a "x$have_polkit" = "xno"; then
+ AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found])
+ fi
+fi
+
if test "x$have_polkit" = "xyes" ; then
AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
fi
1.1 sys-auth/consolekit/files/consolekit-cleanup_console_tags.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-cleanup_console_tags.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/consolekit-cleanup_console_tags.patch?rev=1.1&content-type=text/plain
Index: consolekit-cleanup_console_tags.patch
===================================================================
http://bugs.gentoo.org/257761
http://patches.ubuntu.com/by-release/extracted/ubuntu/c/consolekit/
--- src/main.c
+++ src/main.c
@@ -148,6 +148,43 @@
unlink (CONSOLE_KIT_PID_FILE);
}
+#define CONSOLE_TAGS_DIR "/var/run/console"
+
+static void
+delete_console_tags (void)
+{
+ GDir *dir;
+ GError *error = NULL;
+ const gchar *name;
+
+ g_debug ("Cleaning up %s", CONSOLE_TAGS_DIR);
+
+ dir = g_dir_open (CONSOLE_TAGS_DIR, 0, &error);
+ if (dir == NULL) {
+ g_debug ("Couldn't open directory %s: %s", CONSOLE_TAGS_DIR,
+ error->message);
+ g_error_free (error);
+ return;
+ }
+ while ((name = g_dir_read_name (dir)) != NULL) {
+ gchar *file;
+ file = g_build_filename (CONSOLE_TAGS_DIR, name, NULL);
+
+ g_debug ("Removing tag file: %s", file);
+ if (unlink (file) == -1) {
+ g_warning ("Couldn't delete tag file: %s", file);
+ }
+ g_free (file);
+ }
+}
+
+static void
+cleanup (void)
+{
+ delete_console_tags ();
+ delete_pid ();
+}
+
/* copied from nautilus */
static int debug_log_pipes[2];
@@ -228,7 +265,7 @@
snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ());
written = write (pf, pid, strlen (pid));
close (pf);
- g_atexit (delete_pid);
+ g_atexit (cleanup);
} else {
g_warning ("Unable to write pid file %s: %s",
CONSOLE_KIT_PID_FILE,
@@ -317,6 +354,8 @@
goto out;
}
+ delete_console_tags ();
+
create_pid_file ();
loop = g_main_loop_new (NULL, FALSE);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-14 12:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 12:53 [gentoo-commits] gentoo-x86 commit in sys-auth/consolekit/files: consolekit-shutdown-reboot-without-policies.patch consolekit-udev-acl-install_to_usr.patch consolekit-0.4.5-polkit-automagic.patch consolekit-cleanup_console_tags.patch Samuli Suominen (ssuominen)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox