Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -1,15 +1,13 @@
# $NetBSD: Makefile,v 1.21 2013/05/31 12:41:59 wiz Exp $
#
# $NetBSD: Makefile,v 1.25 2014/08/17 15:59:07 wiz Exp $
CONSOLEKIT_VER= 0.3.0
CONSOLEKIT_VER= 0.4.5
DISTNAME= ConsoleKit-${CONSOLEKIT_VER}
PKGNAME= consolekit-${CONSOLEKIT_VER}
PKGREVISION= 11
CATEGORIES= sysutils
MASTER_SITES= http://www.freedesktop.org/software/ConsoleKit/dist/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= netbsd-desktop@NetBSD.org
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.freedesktop.org/wiki/Software/ConsoleKit
COMMENT= Framework for defining and tracking users, login sessions, and seats
LICENSE= gnu-gpl-v2
@@ -40,6 +38,7 @@ CONFIGURE_ARGS+= --localstatedir=${VARBASE}
post-extract:
${CP} ${FILESDIR}/ck-sysdeps-netbsd.c ${WRKSRC}/src/
${CP} ${FILESDIR}/ck-sysdeps-openbsd.c ${WRKSRC}/src/
pre-configure:
cd ${WRKSRC} && autoreconf -vi ${AUTORECONF_ARGS}
@@ -47,9 +46,9 @@ pre-configure:
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
post-install:
${CP} ${FILESDIR}/ck-get-x11-display-device.FreeBSD \
${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-display-device.FreeBSD \
${DESTDIR}${PREFIX}/libexec/ck-get-x11-display-device
${CP} ${FILESDIR}/ck-get-x11-server-pid.FreeBSD \
${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-server-pid.FreeBSD \
${DESTDIR}${PREFIX}/libexec/ck-get-x11-server-pid
.endif

View File

@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.4 2010/04/18 19:51:47 jmmv Exp $
@comment $NetBSD: PLIST,v 1.5 2014/08/17 15:59:07 wiz Exp $
bin/ck-history
bin/ck-launch-session
bin/ck-list-sessions
@@ -14,11 +14,9 @@ sbin/ck-log-system-restart
sbin/ck-log-system-start
sbin/ck-log-system-stop
sbin/console-kit-daemon
share/PolicyKit/policy/org.freedesktop.consolekit.policy
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Manager.xml
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Seat.xml
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Session.xml
share/dbus-1/system-services/org.freedesktop.ConsoleKit.service
share/examples/consolekit/ConsoleKit.conf
share/examples/consolekit/00-primary.seat
@pkgdir lib/ConsoleKit/run-session.d
share/examples/consolekit/ConsoleKit.conf

View File

@@ -1,15 +1,11 @@
$NetBSD: distinfo,v 1.8 2010/12/26 20:53:14 markd Exp $
$NetBSD: distinfo,v 1.10 2014/08/17 15:59:07 wiz Exp $
SHA1 (ConsoleKit-0.3.0.tar.bz2) = e3b6156622cc14ebca7382a55b8ed15f2f2bad98
RMD160 (ConsoleKit-0.3.0.tar.bz2) = 7a1ebd2f4bfb65690e70138c9923c3fd2fcaf671
Size (ConsoleKit-0.3.0.tar.bz2) = 393694 bytes
SHA1 (patch-aa) = a1589faf05d5358a0820da6d7da20f09ce4cec1b
SHA1 (patch-ab) = 2e9fe9de1f27c635a4eefa77af8322cb8a02ab35
SHA1 (patch-ac) = 0595a9cd1c4013eb4761e044b4b4b01b613f7d2b
SHA1 (patch-ad) = a1c1a1d0452945550065da3eac2390318c1eb7be
SHA1 (patch-ae) = 8a9612cd35d1ec86240fd17dfa6963c20edc0ad0
SHA1 (patch-af) = e86c63147798d61f7560cfe7547b0d06d18d5583
SHA1 (patch-ag) = 724e2eb95f7ca78c5659fde1eec2f2c5c6bc5002
SHA1 (patch-ah) = f62d8c661732a4ea47e29b99f883b539fb5c7468
SHA1 (patch-ai) = 1cdec78f885adc26ab21deff165ffdf366eaf883
SHA1 (patch-aj) = 61538936f3c31f24d8169f4f55d0822d99ed2fbd
SHA1 (ConsoleKit-0.4.5.tar.bz2) = 6f090c1ce0d459dd6904854532554323755bdeca
RMD160 (ConsoleKit-0.4.5.tar.bz2) = 2eba158e321778a4c17bf765d0106d214b93fe53
Size (ConsoleKit-0.4.5.tar.bz2) = 425423 bytes
SHA1 (patch-aa) = baafe5aa4c99279d85edb0e4bc76491e80314950
SHA1 (patch-ab) = 24036207cc59ccd97f8ed9a53cc588ff94b8c2fe
SHA1 (patch-ac) = 3ef09f16ee039da7cea0c020c2aeccfe5d88c57c
SHA1 (patch-ad) = c0cf170a85e04e2dadfd490f303a40e8d62cc626
SHA1 (patch-ae) = dcb689861f8ee425b94a8acf1cb344a782b4328b
SHA1 (patch-af) = 9c7febd3a1e995060e5755b205c5d4a7217bc1b8

View File

@@ -0,0 +1,471 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2006 William Jon McCann <mccann@jhu.edu>
* Copyright (C) 2007 Joe Marcus Clarke <marcus@FreeBSD.org>
* Copyright (C) 2008 Jared D. McNeill <jmcneill@NetBSD.org>
* Copyright (C) 2009 Robert Nagy <robert@openbsd.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <paths.h>
#include <ttyent.h>
#include <kvm.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#include <sys/ioctl.h>
#ifdef __OpenBSD__
#include <sys/stdint.h>
#endif
#include <dev/wscons/wsdisplay_usl_io.h>
#define DEV_ENCODE(M,m) ( \
( (M&0xfff) << 8) | ( (m&0xfff00) << 12) | (m&0xff) \
)
#include "ck-sysdeps.h"
#ifndef ERROR
#define ERROR -1
#endif
/* adapted from procps */
struct _CkProcessStat
{
int pid;
int ppid; /* stat,status pid of parent process */
char state; /* stat,status single-char code for process state (S=sleeping) */
char cmd[16]; /* stat,status basename of executable file in call to exec(2) */
unsigned long long utime; /* stat user-mode CPU time accumulated by process */
unsigned long long stime; /* stat kernel-mode CPU time accumulated by process */
unsigned long long cutime; /* stat cumulative utime of process and reaped children */
unsigned long long cstime; /* stat cumulative stime of process and reaped children */
unsigned long long start_time; /* stat start time of process -- seconds since 1-1-70 */
unsigned long start_code; /* stat address of beginning of code segment */
unsigned long end_code; /* stat address of end of code segment */
unsigned long start_stack; /* stat address of the bottom of stack for the process */
unsigned long kstk_esp; /* stat kernel stack pointer */
unsigned long kstk_eip; /* stat kernel instruction pointer */
unsigned long wchan; /* stat (special) address of kernel wait channel proc is sleeping in */
long priority; /* stat kernel scheduling priority */
long nice; /* stat standard unix nice level of process */
long rss; /* stat resident set size from /proc/#/stat (pages) */
long alarm; /* stat ? */
unsigned long rtprio; /* stat real-time priority */
unsigned long sched; /* stat scheduling class */
unsigned long vsize; /* stat number of pages of virtual memory ... */
unsigned long rss_rlim; /* stat resident set size limit? */
unsigned long flags; /* stat kernel flags for the process */
unsigned long min_flt; /* stat number of minor page faults since process start */
unsigned long maj_flt; /* stat number of major page faults since process start */
unsigned long cmin_flt; /* stat cumulative min_flt of process and child processes */
unsigned long cmaj_flt; /* stat cumulative maj_flt of process and child processes */
int pgrp; /* stat process group id */
int session; /* stat session id */
int nlwp; /* stat number of threads, or 0 if no clue */
int tty; /* stat full device number of controlling terminal */
int tpgid; /* stat terminal process group id */
int exit_signal; /* stat might not be SIGCHLD */
int processor; /* stat current (or most recent?) CPU */
uintptr_t penv; /* stat address of initial environment vector */
char tty_text[11]; /* stat device name */
};
pid_t
ck_process_stat_get_ppid (CkProcessStat *stat)
{
g_return_val_if_fail (stat != NULL, -1);
return stat->ppid;
}
char *
ck_process_stat_get_cmd (CkProcessStat *stat)
{
g_return_val_if_fail (stat != NULL, NULL);
return g_strdup (stat->cmd);
}
char *
ck_process_stat_get_tty (CkProcessStat *stat)
{
g_return_val_if_fail (stat != NULL, NULL);
return g_strdup (stat->tty_text);
}
static gboolean
get_kinfo_proc (pid_t pid,
struct kinfo_proc *p)
{
size_t len;
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid,
sizeof(struct kinfo_proc), 0 };
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#endif
if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) < 0)
return FALSE;
mib[5] = (len / sizeof(struct kinfo_proc));
if (sysctl(mib, nitems(mib), p, &len, NULL, 0) < 0)
return FALSE;
return TRUE;
}
/* return 1 if it works, or 0 for failure */
static gboolean
stat2proc (pid_t pid,
CkProcessStat *P)
{
struct kinfo_proc p;
char *ttname;
int num;
int tty_maj;
int tty_min;
if (! get_kinfo_proc (pid, &p)) {
return FALSE;
}
num = KI_MAXCOMLEN;
if (num >= sizeof P->cmd) {
num = sizeof P->cmd - 1;
}
memcpy (P->cmd, p.p_comm, num);
P->cmd[num] = '\0';
P->pid = p.p_pid;
P->ppid = p.p_ppid;
P->pgrp = p.p__pgid;
P->session = p.p_sid;
P->rss = p.p_vm_rssize;
P->vsize = p.p_vm_dsize + p.p_vm_dsize + p.p_vm_ssize; /* XXX */
P->start_time = p.p_ustart_sec;
P->wchan = (unsigned long) p.p_wchan;
P->state = p.p_stat;
P->nice = p.p_nice;
P->flags = p.p_psflags;
P->tpgid = p.p_tpgid;
P->processor = p.p_cpuid;
/* we like it Linux-encoded :-) */
tty_maj = major (p.p_tdev);
tty_min = minor (p.p_tdev);
P->tty = DEV_ENCODE (tty_maj,tty_min);
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);
}
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);
#else
memcpy (P->tty_text, "/dev/ttyC0", sizeof P->tty_text);
#endif
}
if (P->pid != pid) {
return FALSE;
}
return TRUE;
}
gboolean
ck_process_stat_new_for_unix_pid (pid_t pid,
CkProcessStat **stat,
GError **error)
{
gboolean res;
CkProcessStat *proc;
g_return_val_if_fail (pid > 1, FALSE);
if (stat == NULL) {
return FALSE;
}
proc = g_new0 (CkProcessStat, 1);
proc->pid = pid;
res = stat2proc (pid, proc);
if (res) {
*stat = proc;
} else {
*stat = NULL;
}
return res;
}
void
ck_process_stat_free (CkProcessStat *stat)
{
g_free (stat);
}
GHashTable *
ck_unix_pid_get_env_hash (pid_t pid)
{
GHashTable *hash = NULL;
char **penv;
char errbuf[_POSIX2_LINE_MAX];
kvm_t *kd;
struct kinfo_proc p;
int i;
kd = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
if (kd == NULL) {
g_warning ("kvm_openfiles failed: %s", errbuf);
return NULL;
}
if (! get_kinfo_proc (pid, &p)) {
g_warning ("get_kinfo_proc failed: %s", g_strerror (errno));
goto fail;
}
penv = kvm_getenvv (kd, &p, 0);
if (penv == NULL) {
g_warning ("kvm_getenvv failed: %s", kvm_geterr (kd));
goto fail;
}
hash = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
g_free);
for (i = 0; penv[i] != NULL; i++) {
char **vals;
if (!penv[i][0]) continue;
vals = g_strsplit (penv[i], "=", 2);
if (vals != NULL) {
g_hash_table_insert (hash,
g_strdup (vals[0]),
g_strdup (vals[1]));
g_strfreev (vals);
}
}
fail:
kvm_close (kd);
return hash;
}
char *
ck_unix_pid_get_env (pid_t pid,
const char *var)
{
GHashTable *hash;
char *val = NULL;
/*
* Would probably be more efficient to just loop through the
* environment and return the value, avoiding building the hash
* table, but this works for now.
*/
hash = ck_unix_pid_get_env_hash (pid);
if (hash == NULL)
return val;
val = g_strdup (g_hash_table_lookup (hash, var));
g_hash_table_destroy (hash);
return val;
}
uid_t
ck_unix_pid_get_uid (pid_t pid)
{
uid_t uid;
gboolean res;
struct kinfo_proc p;
g_return_val_if_fail (pid > 1, 0);
uid = -1;
res = get_kinfo_proc (pid, &p);
if (res) {
uid = p.p_uid;
}
return uid;
}
gboolean
ck_unix_pid_get_login_session_id (pid_t pid,
char **idp)
{
g_return_val_if_fail (pid > 1, FALSE);
return FALSE;
}
gboolean
ck_get_max_num_consoles (guint *num)
{
int max_consoles;
int res;
gboolean ret;
struct ttyent *t;
ret = FALSE;
max_consoles = 0;
res = setttyent ();
if (res == 0) {
goto done;
}
while ((t = getttyent ()) != NULL) {
if (t->ty_status & TTY_ON && strncmp (t->ty_name, "ttyC", 4) == 0)
max_consoles++;
}
/* Increment one more so that all consoles are properly counted
* this is arguable a bug in vt_add_watches().
*/
max_consoles++;
ret = TRUE;
endttyent ();
done:
if (num != NULL) {
*num = max_consoles;
}
return ret;
}
gboolean
ck_supports_activatable_consoles (void)
{
return TRUE;
}
char *
ck_get_console_device_for_num (guint num)
{
char *device;
/* VT are only available on i386, amd64 and macppc */
#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
/* The device number is always one less than the VT number. */
num--;
#endif
device = g_strdup_printf ("/dev/ttyC%u", num);
return device;
}
gboolean
ck_get_console_num_from_device (const char *device,
guint *num)
{
guint n;
gboolean ret;
n = 0;
ret = FALSE;
if (device == NULL) {
return FALSE;
}
if (sscanf (device, "/dev/ttyC%u", &n) == 1) {
/* VT are only available on i386, amd64 and macppc */
#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
/* The VT number is always one more than the device number. */
n++;
#endif
ret = TRUE;
}
if (num != NULL) {
*num = n;
}
return ret;
}
gboolean
ck_get_active_console_num (int console_fd,
guint *num)
{
gboolean ret;
int res;
int active;
g_assert (console_fd != -1);
active = 0;
ret = FALSE;
/* VT are only available on i386, amd64 and macppc */
#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
res = ioctl (console_fd, VT_GETACTIVE, &active);
if (res == ERROR) {
perror ("ioctl VT_GETACTIVE");
goto out;
}
g_debug ("Active VT is: %d (ttyC%d)", active, active - 1);
#else
res = 0;
g_debug ("Active console is: ttyC%d", active);
#endif
ret = TRUE;
out:
if (num != NULL) {
*num = active;
}
return ret;
}

View File

@@ -1,31 +1,10 @@
$NetBSD: patch-aa,v 1.3 2008/12/23 21:46:14 jmcneill Exp $
$NetBSD: patch-aa,v 1.5 2014/08/17 15:59:07 wiz Exp $
--- configure.ac.orig 2008-07-30 20:35:53.000000000 -0400
+++ configure.ac 2008-12-23 16:40:06.000000000 -0500
@@ -68,10 +68,21 @@
PKG_CHECK_MODULES(LIBDBUS,
dbus-1 >= $DBUS_REQUIRED_VERSION
)
+PKG_CHECK_MODULES(X11, x11 >= $X11_REQUIRED_VERSION, [HAVE_X11=yes], [HAVE_X11=no])
+if test x$HAVE_X11 = xno; then
+ AC_PATH_XTRA
+ if test "x$no_x" = xyes; then
+ AC_MSG_ERROR(X11 and Xrandr development libraries not found);
+ else
+ XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ XLIB_CFLAGS=$X_CFLAGS
+ fi
+fi
PKG_CHECK_MODULES(TOOLS,
- x11 >= $X11_REQUIRED_VERSION
glib-2.0 >= $GLIB_REQUIRED_VERSION
)
+TOOLS_CFLAGS="$TOOLS_CFLAGS $X11_CFLAGS $XLIB_CFLAGS"
+TOOLS_LIBS="$TOOLS_LIBS $X11_LIBS $XLIB_LIBS"
PKG_CHECK_MODULES(HISTORY,
glib-2.0 >= $GLIB_REQUIRED_VERSION
@@ -190,12 +201,20 @@
Add backends for NetBSD, Dragonfly, and OpenBSD.
--- configure.ac.orig 2011-02-17 00:37:16.000000000 +0000
+++ configure.ac
@@ -190,6 +201,21 @@ case "$host" in
*-*-solaris*)
CK_BACKEND="solaris"
;;
@@ -36,20 +15,24 @@ $NetBSD: patch-aa,v 1.3 2008/12/23 21:46:14 jmcneill Exp $
+ CK_BACKEND="freebsd"
+ KVM_LIBS="-lkvm"
+ ;;
esac
AC_SUBST(KVM_LIBS)
+ *-*-openbsd*)
+ CK_BACKEND="openbsd"
+ AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
+ AC_MSG_ERROR([Unable to find libkvm which is needed on OpenBSD]))
+ if test "x$have_kvm" = "xyes"; then
+ KVM_LIBS="-lkvm"
+ fi
+ ;;
*)
AC_MSG_ERROR([No sysdeps back-end implemented for host $host])
;;
@@ -199,7 +225,9 @@ AC_SUBST(KVM_LIBS)
AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux])
AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD])
+AM_CONDITIONAL(CK_COMPILE_NETBSD, test x$CK_BACKEND = xnetbsd, [Compiling for NetBSD])
AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris])
+AM_CONDITIONAL(CK_COMPILE_OPENBSD, test x$CK_BACKEND = xopenbsd, [Compiling for OpenBSD])
AC_SUBST(CK_BACKEND)
@@ -441,4 +460,4 @@
echo " a huge SECURITY HOLE. I repeat: YOU NEED TO EDIT THE FILE"
echo " ConsoleKit.conf to match your distro/site to avoid NASTY SECURITY HOLES."
echo ""
-fi
\ No newline at end of file
+fi
dnl ---------------------------------------------------------------------------

View File

@@ -1,8 +1,10 @@
$NetBSD: patch-ab,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
$NetBSD: patch-ab,v 1.3 2014/08/17 15:59:07 wiz Exp $
--- src/Makefile.am.orig 2008-07-25 14:38:56.000000000 -0400
Add backends for NetBSD and OpenBSD.
--- src/Makefile.am.orig 2008-07-25 18:38:56.000000000 +0000
+++ src/Makefile.am
@@ -56,11 +56,18 @@ libck_la_SOURCES += \
@@ -56,11 +56,25 @@ libck_la_SOURCES += \
$(NULL)
libck_la_LIBADD = $(KVM_LIBS)
endif
@@ -11,6 +13,12 @@ $NetBSD: patch-ab,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
+ ck-sysdeps-netbsd.c \
+ $(NULL)
+libck_la_LIBADD = -lkvm
+endif
+if CK_COMPILE_OPENBSD
+libck_la_SOURCES += \
+ ck-sysdeps-openbsd.c \
+ $(NULL)
+libck_la_LIBADD = $(KVM_LIBS)
+endif
EXTRA_libck_la_SOURCES = \
@@ -18,6 +26,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
ck-sysdeps-solaris.c \
ck-sysdeps-freebsd.c \
+ ck-sysdeps-netbsd.c \
+ ck-sysdeps-openbsd.c \
$(NULL)
sbin_PROGRAMS = \

View File

@@ -1,14 +1,20 @@
$NetBSD: patch-ac,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
$NetBSD: patch-ac,v 1.3 2014/08/17 15:59:07 wiz Exp $
--- tools/Makefile.am.orig 2008-02-12 22:46:39.000000000 -0500
Add backends for NetBSD and OpenBSD.
--- tools/Makefile.am.orig 2008-02-13 03:46:39.000000000 +0000
+++ tools/Makefile.am
@@ -18,6 +18,10 @@ if CK_COMPILE_SOLARIS
@@ -18,6 +18,14 @@ if CK_COMPILE_SOLARIS
SUBDIRS += solaris
endif
+if CK_COMPILE_NETBSD
+SUBDIRS += freebsd
+endif
+
+if CK_COMPILE_OPENBSD
+SUBDIRS += freebsd
+endif
+
DIST_SUBDIRS = \
linux \

View File

@@ -1,4 +1,6 @@
$NetBSD: patch-ad,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
$NetBSD: patch-ad,v 1.2 2014/08/17 15:59:07 wiz Exp $
Install config files into pkgsrc example path.
--- data/Makefile.am.orig 2008-02-29 15:23:02.000000000 -0500
+++ data/Makefile.am

View File

@@ -1,7 +1,9 @@
$NetBSD: patch-ae,v 1.5 2008/12/26 20:05:56 hasso Exp $
$NetBSD: patch-ae,v 1.7 2014/08/17 15:59:07 wiz Exp $
--- src/ck-sysdeps-unix.c.orig 2008-11-27 05:10:25 +0200
+++ src/ck-sysdeps-unix.c 2008-11-27 05:09:59 +0200
Fix UNIX backend for NetBSD, DragonFly, and OpenBSD.
--- src/ck-sysdeps-unix.c.orig 2008-01-23 14:30:44.000000000 +0000
+++ src/ck-sysdeps-unix.c
@@ -35,6 +35,11 @@
#include <linux/kd.h>
#endif
@@ -40,7 +42,19 @@ $NetBSD: patch-ae,v 1.5 2008/12/26 20:05:56 hasso Exp $
/* Adapted from dbus-sysdeps-unix.c:_dbus_read_credentials_socket() */
gboolean
ck_get_socket_peer_credentials (int socket_fd,
@@ -99,7 +123,16 @@ ck_get_socket_peer_credentials (int
@@ -69,7 +93,11 @@ ck_get_socket_peer_credentials (int
ret = FALSE;
#ifdef SO_PEERCRED
+#if !defined(__OpenBSD__)
struct ucred cr;
+#else
+ struct sockpeercred cr;
+#endif
socklen_t cr_len;
cr_len = sizeof (cr);
@@ -99,7 +127,16 @@ ck_get_socket_peer_credentials (int
if (ucred != NULL) {
ucred_free (ucred);
}
@@ -58,7 +72,7 @@ $NetBSD: patch-ae,v 1.5 2008/12/26 20:05:56 hasso Exp $
g_warning ("Socket credentials not supported on this OS\n");
#endif
@@ -126,17 +159,17 @@ ck_get_socket_peer_credentials (int
@@ -126,17 +163,17 @@ ck_get_socket_peer_credentials (int
gboolean
ck_fd_is_a_console (int fd)
{
@@ -80,7 +94,7 @@ $NetBSD: patch-ae,v 1.5 2008/12/26 20:05:56 hasso Exp $
kb_ok = (ioctl (fd, CONS_GETVERS, &vers) == 0);
#else
kb_ok = 1;
@@ -172,6 +205,15 @@ ck_get_a_console_fd (void)
@@ -172,6 +209,15 @@ ck_get_a_console_fd (void)
fd = -1;
@@ -96,7 +110,7 @@ $NetBSD: patch-ae,v 1.5 2008/12/26 20:05:56 hasso Exp $
#ifdef __sun
/* On Solaris, first try Sun VT device. */
fd = open_a_console ("/dev/vt/active");
@@ -184,6 +226,14 @@ ck_get_a_console_fd (void)
@@ -184,6 +230,14 @@ ck_get_a_console_fd (void)
}
#endif

View File

@@ -1,7 +1,9 @@
$NetBSD: patch-af,v 1.2 2008/12/26 20:05:56 hasso Exp $
$NetBSD: patch-af,v 1.3 2014/08/17 15:59:07 wiz Exp $
--- src/ck-sysdeps-freebsd.c.orig 2008-11-27 05:12:41 +0200
+++ src/ck-sysdeps-freebsd.c 2008-11-27 05:08:28 +0200
Adapt FreeBSD backend for DragonFly.
--- src/ck-sysdeps-freebsd.c.orig 2010-09-03 13:54:31.000000000 +0000
+++ src/ck-sysdeps-freebsd.c
@@ -27,6 +27,7 @@
#include <unistd.h>
#include <string.h>
@@ -169,8 +171,8 @@ $NetBSD: patch-af,v 1.2 2008/12/26 20:05:56 hasso Exp $
+ return TRUE;
}
char *
@@ -369,7 +412,12 @@ ck_get_console_device_for_num (guint num
gboolean
@@ -375,7 +418,12 @@ ck_get_console_device_for_num (guint num
/* The device number is always one less than the VT number. */
num--;
@@ -184,7 +186,7 @@ $NetBSD: patch-af,v 1.2 2008/12/26 20:05:56 hasso Exp $
return device;
}
@@ -379,6 +427,7 @@ ck_get_console_num_from_device (const ch
@@ -385,6 +433,7 @@ ck_get_console_num_from_device (const ch
guint *num)
{
guint n;
@@ -192,7 +194,7 @@ $NetBSD: patch-af,v 1.2 2008/12/26 20:05:56 hasso Exp $
gboolean ret;
n = 0;
@@ -388,7 +437,11 @@ ck_get_console_num_from_device (const ch
@@ -394,7 +443,11 @@ ck_get_console_num_from_device (const ch
return FALSE;
}
@@ -205,7 +207,7 @@ $NetBSD: patch-af,v 1.2 2008/12/26 20:05:56 hasso Exp $
/* The VT number is always one more than the device number. */
n++;
ret = TRUE;
@@ -408,6 +461,7 @@ ck_get_active_console_num (int consol
@@ -414,6 +467,7 @@ ck_get_active_console_num (int consol
gboolean ret;
int res;
int active;
@@ -213,7 +215,7 @@ $NetBSD: patch-af,v 1.2 2008/12/26 20:05:56 hasso Exp $
g_assert (console_fd != -1);
@@ -420,7 +474,12 @@ ck_get_active_console_num (int consol
@@ -426,7 +480,12 @@ ck_get_active_console_num (int consol
goto out;
}

View File

@@ -1,15 +0,0 @@
$NetBSD: patch-ag,v 1.1 2008/12/26 20:05:57 hasso Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=18330
--- src/ck-session.c.orig 2008-11-27 05:49:11 +0200
+++ src/ck-session.c 2008-11-27 08:51:37 +0200
@@ -1100,6 +1100,8 @@ ck_session_finalize (GObject *object)
session_remove_activity_watch (session);
+ g_object_unref (session->priv->bus_proxy);
+
g_free (session->priv->id);
g_free (session->priv->cookie);
g_free (session->priv->seat_id);

View File

@@ -1,14 +0,0 @@
$NetBSD: patch-ah,v 1.1 2008/12/26 20:05:57 hasso Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=17893
--- src/ck-run-programs.c.orig 2008-11-27 08:52:06 +0200
+++ src/ck-run-programs.c 2008-11-27 08:52:40 +0200
@@ -225,6 +225,7 @@ ck_run_programs (const char *dirpath,
out_loop:
g_free (child_argv[0]);
}
+ g_dir_close (dir);
out:
g_strfreev (env_for_child);
}

View File

@@ -1,27 +0,0 @@
$NetBSD: patch-ai,v 1.1 2009/09/23 09:35:48 sketch Exp $
--- src/ck-log-event.h.orig Wed Sep 23 10:29:34 2009
+++ src/ck-log-event.h Wed Sep 23 10:33:19 2009
@@ -45,18 +45,22 @@
typedef struct
{
+ int dummy;
} CkLogNoneEvent;
typedef struct
{
+ int dummy;
} CkLogSystemStopEvent;
typedef struct
{
+ int dummy;
} CkLogSystemRestartEvent;
typedef struct
{
+ int dummy;
} CkLogSystemStartEvent;
typedef struct

View File

@@ -1,181 +0,0 @@
$NetBSD: patch-aj,v 1.1 2010/12/26 20:53:14 markd Exp $
Fixed rules from ConsoleKit 0.4.x
--- data/ConsoleKit.conf.orig 2008-04-19 05:39:49.000000000 +0000
+++ data/ConsoleKit.conf
@@ -8,89 +8,134 @@
<allow own="org.freedesktop.ConsoleKit"/>
<!-- Allow all methods on interfaces -->
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"/>
+ <allow send_destination="org.freedesktop.ConsoleKit"/>
</policy>
<!-- Deny all and then allow some methods on interfaces -->
<policy context="default">
- <deny send_interface="org.freedesktop.ConsoleKit.Manager"/>
- <deny send_interface="org.freedesktop.ConsoleKit.Seat"/>
- <deny send_interface="org.freedesktop.ConsoleKit.Session"/>
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.DBus.Introspectable"/>
+ <deny send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"/>
+ <deny send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"/>
+ <deny send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"/>
<deny send_destination="org.freedesktop.ConsoleKit"
send_interface="org.freedesktop.DBus.Properties" />
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="Restart"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="Stop"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="OpenSession"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="CloseSession"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSeats"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
+ send_member="GetSessions"/>
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSessionForCookie"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSessionForUnixProcess"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetCurrentSession"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSessionsForUnixUser"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSessionsForUser"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSystemIdleHint"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Manager"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Manager"
send_member="GetSystemIdleSinceHint"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"
send_member="GetId"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"
send_member="GetSessions"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"
send_member="GetDevices"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"
send_member="GetActiveSession"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"
send_member="CanActivateSessions"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Seat"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Seat"
send_member="ActivateSession"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetId"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetSeatId"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetLoginSessionId"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetSessionType"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetUser"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetUnixUser"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetX11Display"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetX11DisplayDevice"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetDisplayDevice"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetRemoteHostName"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="IsActive"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="IsLocal"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetCreationTime"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="Activate"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetIdleHint"/>
- <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="SetIdleHint"/>
+ <allow send_destination="org.freedesktop.ConsoleKit"
+ send_interface="org.freedesktop.ConsoleKit.Session"
send_member="GetIdleSinceHint"/>
+ <allow send_interface="org.freedesktop.ConsoleKit.Session"
+ send_member="SetIdleHint"/>
</policy>
</busconfig>