Sync a few cleanups from the ConsoleKit2 project.

This commit is contained in:
ajacoutot 2014-11-27 09:38:22 +00:00
parent 06801df18d
commit e93fb78799
4 changed files with 22 additions and 23 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.44 2014/10/10 12:46:23 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.45 2014/11/27 09:38:22 ajacoutot Exp $
# NOTE: spam in /var/log/authlog is "expected"
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678506
@ -10,7 +10,7 @@ COMMENT= framework for defining and tracking users
DISTNAME= ConsoleKit-0.4.6
EXTRACT_SUFX= .tar.xz
PKGNAME= ${DISTNAME:L}
REVISION= 10
REVISION= 11
CATEGORIES= sysutils

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_ck-sysdeps-openbsd_c,v 1.17 2013/11/30 08:21:41 ajacoutot Exp $
--- src/ck-sysdeps-openbsd.c.orig Wed Nov 27 15:56:18 2013
+++ src/ck-sysdeps-openbsd.c Wed Nov 27 15:57:40 2013
$OpenBSD: patch-src_ck-sysdeps-openbsd_c,v 1.18 2014/11/27 09:38:22 ajacoutot Exp $
--- src/ck-sysdeps-openbsd.c.orig Thu Nov 27 10:30:57 2014
+++ src/ck-sysdeps-openbsd.c Thu Nov 27 10:32:12 2014
@@ -0,0 +1,471 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
@ -195,15 +195,15 @@ $OpenBSD: patch-src_ck-sysdeps-openbsd_c,v 1.17 2013/11/30 08:21:41 ajacoutot Ex
+ snprintf (P->tty_text, sizeof P->tty_text, "%3d,%-3d", tty_maj, tty_min);
+
+ if (p.p_tdev != NODEV && (ttname = devname (p.p_tdev, S_IFCHR)) != NULL) {
+ memcpy (P->tty_text, ttname, sizeof P->tty_text);
+ memcpy (P->tty_text, ttname, sizeof (P->tty_text));
+ }
+
+ if (p.p_tdev == NODEV) {
+ /* XXX how do we associate X with its tty? */
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+ memcpy (P->tty_text, "/dev/ttyC4", sizeof P->tty_text);
+ memcpy (P->tty_text, "/dev/ttyC4", sizeof (P->tty_text));
+#else
+ memcpy (P->tty_text, "/dev/ttyC0", sizeof P->tty_text);
+ memcpy (P->tty_text, "/dev/ttyC0", sizeof (P->tty_text));
+#endif
+ }
+
@ -382,7 +382,7 @@ $OpenBSD: patch-src_ck-sysdeps-openbsd_c,v 1.17 2013/11/30 08:21:41 ajacoutot Ex
+ if (num != NULL) {
+ *num = max_consoles;
+ }
+
+
+ return ret;
+}
+

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-tools_ck-log-system-start_c,v 1.1 2011/04/28 13:08:33 ajacoutot Exp $
--- tools/ck-log-system-start.c.orig Fri Sep 3 15:54:31 2010
+++ tools/ck-log-system-start.c Wed Apr 27 20:01:29 2011
$OpenBSD: patch-tools_ck-log-system-start_c,v 1.2 2014/11/27 09:38:22 ajacoutot Exp $
--- tools/ck-log-system-start.c.orig Fri Jul 19 06:15:28 2013
+++ tools/ck-log-system-start.c Thu Nov 27 10:34:39 2014
@@ -41,7 +41,9 @@
#define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
@ -11,21 +11,21 @@ $OpenBSD: patch-tools_ck-log-system-start_c,v 1.1 2011/04/28 13:08:33 ajacoutot
/* Adapted from auditd auditd-event.c */
static gboolean
@@ -163,6 +165,7 @@ static char *
@@ -162,6 +164,7 @@ write_log_for_event (CkLogEvent *event)
static char *
get_boot_arguments (void)
{
+#if defined(__linux__)
char *contents;
+#ifdef __linux__
gboolean res;
contents = NULL;
@@ -176,6 +179,9 @@ get_boot_arguments (void)
} else {
g_strchomp (contents);
@@ -178,6 +181,9 @@ get_boot_arguments (void)
}
+#else
+ contents = NULL;
+#endif
return contents;
+#else
+ return NULL;
+#endif
}
int

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.9 2013/12/30 08:52:08 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.10 2014/11/27 09:38:22 ajacoutot Exp $
@extra /var/log/ConsoleKit/history
@bin bin/ck-history
@bin bin/ck-launch-session
@ -15,7 +15,6 @@ lib/ConsoleKit/scripts/ck-system-stop
lib/libck-connector.a
lib/libck-connector.la
@lib lib/libck-connector.so.${LIBck-connector_VERSION}
lib/pkgconfig/
lib/pkgconfig/ck-connector.pc
@bin libexec/ck-collect-session-info
@bin libexec/ck-get-x11-display-device