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,5 +1,5 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2006/12/17 15:39:33 jmmv Exp $
$NetBSD: MESSAGE,v 1.2 2014/12/02 05:20:24 snj Exp $
You should enable the dbus system-wide daemon for correct operation. You
can do this by using one of the three start-up scripts installed by the
@@ -9,7 +9,7 @@ package. Use:
if you are using NetBSD's and pkgsrc's rc.subr start-up framework.
* ${PREFIX}/share/examples/rc.d/messagebus.redhat:
if you are using a Red-Hat based system (such as Fedora Core).
if you are using a Red-Hat based system (such as Fedora).
* ${PREFIX}/share/examples/rc.d/rc.messagebus.slackware:
if you are using a Slackware-like system.

View File

@@ -0,0 +1,20 @@
===========================================================================
$NetBSD: MESSAGE.launchd,v 1.1 2015/01/21 05:38:59 pho Exp $
A launchd agent configuration file has been installed at:
${PREFIX}/Library/LaunchAgents/org.freedesktop.dbus-session.plist
You need to manually load it to auto-start a session bus. Without
loading it, no applications can start a bus nor find an existing one:
% sudo launchctl load \
${PREFIX}/Library/LaunchAgents/org.freedesktop.dbus-session.plist
Or alternatively, you can copy it under the system default path to
automatically load it on system boot:
% sudo cp \
${PREFIX}/Library/LaunchAgents/org.freedesktop.dbus-session.plist \
/Library/LaunchAgents/
% sudo launchctl load \
/Library/LaunchAgents/org.freedesktop.dbus-session.plist
===========================================================================

View File

@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.65 2013/11/03 16:09:03 wiz Exp $
# $NetBSD: Makefile,v 1.81 2015/02/17 13:48:24 wiz Exp $
DISTNAME= dbus-1.6.18
DISTNAME= dbus-1.8.16
CATEGORIES= sysutils
MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/
@@ -10,7 +10,8 @@ COMMENT= Message bus system
LICENSE= gnu-gpl-v2
CONFLICTS+= dbus-glib<0.71
CONFLICTS+= py*-dbus<0.71
CONFLICTS+= py26-dbus<0.71
CONFLICTS+= py27-dbus<0.71
GNU_CONFIGURE= YES
USE_TOOLS+= gmake msgfmt pkg-config
@@ -23,31 +24,32 @@ BUILD_DEFS+= VARBASE
OWN_DIRS_PERMS+= ${VARBASE}/db/dbus ${DBUS_USER} ${DBUS_GROUP} 0755
SPECIAL_PERMS+= libexec/dbus-daemon-launch-helper ${REAL_ROOT_USER} ${DBUS_GROUP} 4511
.include "../../mk/bsd.prefs.mk"
SMF_METHODS= dbus
SMF_NAME= dbus
# Disable man2html detection forcibly
CONFIGURE_ENV+= ac_cv_path_MAN2HTML=
MESSAGE_SRC+= MESSAGE
.include "../../mk/bsd.prefs.mk"
CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
#CONFIGURE_ARGS+= --enable-embedded-tests
#CFLAGS.NetBSD+= -D_NETBSD_SOURCE
CONFIGURE_ARGS_GROUPS= enable disable with without
.if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --with-session-socket-dir=/tmp
# Prevent the configure script from picking up a per-user tmp
# directory. See the commit message on revision 1.35
CONFIGURE_ARGS.with+= session-socket-dir=/tmp
.endif
CONFIGURE_ARGS.Linux= abstract-sockets dnotify selinux
CONFIGURE_ARGS.Linux= abstract-sockets selinux
CONFIGURE_ARGS.docs= doxygen-docs xml-docs
CONFIGURE_ARGS.without+= init-scripts
CONFIGURE_ARGS.disable= ansi gcov
CONFIGURE_ARGS.disable+= ansi
CONFIGURE_ARGS.disable+= console-owner-file
CONFIGURE_ARGS.disable+= ${CONFIGURE_ARGS.docs}
CONFIGURE_ARGS.enable= checks static
CONFIGURE_ARGS.enable+= checks static
###
### XXX the spawn test hangs, and some of these tests may be bogus
###
@@ -56,9 +58,8 @@ CONFIGURE_ARGS.enable= checks static
#TEST_TARGET= check
#.endif
CONFIGURE_ARGS.with= dbus-user=${DBUS_USER}
CONFIGURE_ARGS.with+= dbus-user=${DBUS_USER}
CONFIGURE_ARGS.with+= test-socket-dir=${WRKDIR:Q}
CONFIGURE_ARGS.with+= xml=expat
PTHREAD_AUTO_VARS= yes
@@ -69,7 +70,7 @@ CONFIGURE_ARGS.disable+=\
${CONFIGURE_ARGS.Linux}
.endif
PLIST_VARS+= linux
PLIST_VARS+= linux launchd
CONFIGURE_ARGS+=\
${CONFIGURE_ARGS_GROUPS:@.g.@ \
@@ -111,14 +112,6 @@ BUILDLINK_TRANSFORM+= rm:-lrt
.include "options.mk"
.if ${OPSYS} == "Linux"
post-install:
${INSTALL_DATA} ${WRKSRC}/bus/rc.messagebus \
${DESTDIR}${PREFIX}/share/examples/rc.d/rc.messagebus.slackware
${INSTALL_DATA} ${WRKSRC}/bus/messagebus \
${DESTDIR}${PREFIX}/share/examples/rc.d/messagebus.redhat
.endif
.include "../../mk/pthread.buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"

View File

@@ -1,8 +1,10 @@
@comment $NetBSD: PLIST,v 1.16 2014/03/11 14:05:15 jperkin Exp $
@comment $NetBSD: PLIST,v 1.18 2015/01/21 13:45:18 pho Exp $
${PLIST.launchd}Library/LaunchAgents/org.freedesktop.dbus-session.plist
bin/dbus-cleanup-sockets
bin/dbus-daemon
bin/dbus-launch
bin/dbus-monitor
bin/dbus-run-session
bin/dbus-send
bin/dbus-uuidgen
include/dbus-1.0/dbus/dbus-address.h
@@ -26,18 +28,10 @@ lib/dbus-1.0/include/dbus/dbus-arch-deps.h
lib/libdbus-1.la
lib/pkgconfig/dbus-1.pc
libexec/dbus-daemon-launch-helper
man/man1/dbus-cleanup-sockets.1
man/man1/dbus-daemon.1
man/man1/dbus-launch.1
man/man1/dbus-monitor.1
man/man1/dbus-send.1
man/man1/dbus-uuidgen.1
share/doc/dbus/dbus-faq.html
share/doc/dbus/dbus-specification.html
share/doc/dbus/dbus-test-plan.html
share/doc/dbus/dbus-tutorial.html
share/doc/dbus/diagram.png
share/doc/dbus/diagram.svg
share/doc/dbus/system-activation.txt
share/examples/dbus/session.conf
share/examples/dbus/system.conf
@pkgdir share/dbus-1/system-services
@pkgdir share/dbus-1/services

View File

@@ -1,11 +1,14 @@
$NetBSD: distinfo,v 1.47 2013/11/03 16:09:03 wiz Exp $
$NetBSD: distinfo,v 1.63 2015/02/17 13:48:24 wiz Exp $
SHA1 (dbus-1.6.18.tar.gz) = d9eefcb533a9afbec96b0548925af4d88ea544e7
RMD160 (dbus-1.6.18.tar.gz) = a0b934e3c959ece92e5c84edbdcbcc5e48e41acc
Size (dbus-1.6.18.tar.gz) = 1916553 bytes
SHA1 (dbus-1.8.16.tar.gz) = 1504f03289dc4a694dae4980a773f63dd7fd1a01
RMD160 (dbus-1.8.16.tar.gz) = c333f4e5808fc4c5b6a5d77f06bd473971411e60
Size (dbus-1.8.16.tar.gz) = 1866436 bytes
SHA1 (patch-aa) = 0c3d145979e3b2358261c9f7f34701d02eb6ecd4
SHA1 (patch-ab) = 77eb92f31e849789448ae80990caf9f573aa87a7
SHA1 (patch-ak) = fcb0cad1b6e306db03d538d4ca65f4a18d4726ab
SHA1 (patch-ak) = 6d05ebde29acb3f6cb6f577dd2f2b734f590e8dd
SHA1 (patch-al) = 57d08196e9daf49eb6bda2b30f019ce2cad77c6f
SHA1 (patch-am) = 8c794ff8b0981e90243ee20c26ae1ecc72e68de8
SHA1 (patch-ba) = ceb8e0c424c57410f8c3775087e4cae1b44da4c5
SHA1 (patch-ba) = f9126faf18cd19e897865748ebea1011fe516225
SHA1 (patch-bus_dir-watch-kqueue.c) = 86a1f0f78b4d16d8ab29d351057885d8001dd39c
SHA1 (patch-configure) = 08fb6cc6e9bc9f23825a6a0f2b8b241169d1cda7
SHA1 (patch-dbus_dbus-sysdeps-unix.c) = 043e7bf03686f51faf763f87f43e00308b29571e
SHA1 (patch-dbus_dbus-sysdeps-util-unix.c) = 9c967cdac585220a3e65443dc9642e7d4478567c

35
sysutils/dbus/files/smf/dbus.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/sbin/sh
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
if [ ! -x @PREFIX@/bin/dbus-daemon ]; then
echo "@PREFIX@/bin/dbus-daemon not found or not executable"
exit $SMF_EXIT_ERR_FATAL
fi
if [ ! -f @VARBASE@/db/dbus/machine-id ]; then
@PREFIX@/bin/dbus-uuidgen --ensure
fi
case "$1" in
'start')
if [ -f @VARBASE@/run/dbus/pid ]; then
rm -f @VARBASE@/run/dbus/pid
fi
@PREFIX@/bin/dbus-daemon --system
err=$?
if [ $err -ne 0 ]; then
echo "dbus failed to start: error $err"
exit $SMF_EXIT_ERR_FATAL
fi
;;
*)
echo "Usage: $0 { start }"
exit $SMF_EXIT_ERR_FATAL
;;
esac
exit $SMF_EXIT_OK

View File

@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='@SMF_NAME@'>
<service
name='@SMF_PREFIX@/@SMF_NAME@'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<dependency name='usr'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/system/filesystem/minimal' />
</dependency>
<exec_method
type='method'
name='start'
exec='@PREFIX@/@SMF_METHOD_FILE.dbus@ start'
timeout_seconds='30'>
<method_context>
<method_credential user='@DBUS_USER@' group='@DBUS_GROUP@' />
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec=':kill'
timeout_seconds='30' />
<property_group name='startd' type='framework'>
<!-- sub-process core dumps shouldn't restart session -->
<propval name='ignore_error' type='astring'
value='core,signal' />
</property_group>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>
D-BUS message bus
</loctext>
</common_name>
<documentation>
<manpage title='dbus-daemon' section='1' />
</documentation>
</template>
</service>
</service_bundle>

View File

@@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.7 2012/09/02 13:02:13 shattered Exp $
# $NetBSD: options.mk,v 1.8 2015/01/21 13:45:18 pho Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.dbus
PKG_SUPPORTED_OPTIONS+= debug x11
@@ -13,6 +13,12 @@ PKG_SUPPORTED_OPTIONS+= kqueue
PKG_SUGGESTED_OPTIONS+= kqueue
.endif
.if ${OPSYS} == "Darwin"
# We may want to make it SUGGESTED once we have a framework for
# launchd support. See PR/49591.
PKG_SUPPORTED_OPTIONS+= launchd
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mdebug)
@@ -35,3 +41,12 @@ BUILDLINK_DEPMETHOD.libXt= build
.else
CONFIGURE_ARGS.without= x
.endif
.if !empty(PKG_OPTIONS:Mlaunchd)
MESSAGE_SRC+= MESSAGE.launchd
PLIST.launchd= yes
CONFIGURE_ARGS.enable+= launchd
CONFIGURE_ARGS.with+= launchd-agent-dir=${PREFIX}/Library/LaunchAgents
.else
CONFIGURE_ARGS.disable+= launchd
.endif

View File

@@ -1,150 +0,0 @@
$NetBSD: patch-ab,v 1.21 2013/05/26 18:06:04 wiz Exp $
_dbus_poll: Set the timeout value argument to poll to -1 whenever
it is less than -1 to avoid kde4 session start hang
--- dbus/dbus-sysdeps-unix.c.orig 2013-04-22 14:10:32.000000000 +0000
+++ dbus/dbus-sysdeps-unix.c
@@ -22,6 +22,8 @@
*
*/
+#define _NETBSD_SOURCE
+
#include <config.h>
#include "dbus-internals.h"
@@ -75,6 +77,10 @@
#include <alloca.h>
#endif
+#ifdef __NetBSD__
+#include <sys/un.h>
+#endif
+
#ifdef HAVE_ADT
#include <bsm/adt.h>
#endif
@@ -125,6 +131,32 @@
#endif /* Solaris */
+#ifdef LOCAL_PEEREID
+static dbus_bool_t
+dbus_nb_getpeereid(int fd, pid_t *pid, uid_t *uid, gid_t *gid)
+{
+ struct unpcbid cred;
+ socklen_t len = sizeof(cred);
+
+ _dbus_verbose ("dbus_nb_getpeereid: enter, fd=%d\n");
+ if (getsockopt (fd, 0, LOCAL_PEEREID, &cred, &len) < 0)
+ {
+ _dbus_verbose ("dbus_nb_getpeereid: getsockopt LOCAL_PEEREID failed: %s\n", strerror(errno));
+ return FALSE;
+ }
+ if (pid)
+ *pid = cred.unp_pid;
+ if (uid)
+ *uid = cred.unp_euid;
+ if (gid)
+ *gid = cred.unp_egid;
+
+ _dbus_verbose ("dbus_nb_getpeereid: returning TRUE, pid=%d uid=%d gid=%d\n",
+ cred.unp_pid, cred.unp_euid, cred.unp_egid);
+ return TRUE;
+}
+#endif
+
static dbus_bool_t
_dbus_open_socket (int *fd_p,
int domain,
@@ -972,7 +1004,7 @@ _dbus_set_local_creds (int fd, dbus_bool
{
dbus_bool_t retval = TRUE;
-#if defined(HAVE_CMSGCRED)
+#if defined(HAVE_CMSGCRED) || defined(LOCAL_PEEREID)
/* NOOP just to make sure only one codepath is used
* and to prefer CMSGCRED
*/
@@ -1677,6 +1709,11 @@ _dbus_read_credentials_socket (int
char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
} cmsg;
+#elif defined(LOCAL_PEEREID)
+ pid_t sockpid;
+ uid_t sockuid;
+ gid_t sockgid;
+
#elif defined(LOCAL_CREDS)
struct {
struct cmsghdr hdr;
@@ -1712,10 +1749,15 @@ _dbus_read_credentials_socket (int
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
-#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)
+#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID)
_DBUS_ZERO(cmsg);
+#ifdef HAVE_CMSGCRED
msg.msg_control = (caddr_t) &cmsg;
msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
+#else /* defined(LOCAL_CREDS) */
+ msg.msg_control = &cmsg;
+ msg.msg_controllen = sizeof (cmsg);
+#endif
#endif
again:
@@ -1752,9 +1794,13 @@ _dbus_read_credentials_socket (int
return FALSE;
}
-#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)
+#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID)
+#ifdef HAVE_CMSGCRED
if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred))
|| cmsg.hdr.cmsg_type != SCM_CREDS)
+#else /* defined(LOCAL_CREDS) */
+ if (cmsg.hdr.cmsg_len < sizeof (cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS)
+#endif
{
dbus_set_error (error, DBUS_ERROR_FAILED,
"Message from recvmsg() was not SCM_CREDS");
@@ -1790,6 +1836,16 @@ _dbus_read_credentials_socket (int
cred = (struct cmsgcred *) CMSG_DATA (&cmsg.hdr);
pid_read = cred->cmcred_pid;
uid_read = cred->cmcred_euid;
+#elif defined(LOCAL_PEEREID)
+ if (dbus_nb_getpeereid(client_fd, &sockpid, &sockuid, &sockgid) == TRUE)
+ {
+ pid_read = sockpid;
+ uid_read = sockuid;
+ }
+ else
+ {
+ _dbus_verbose ("Failed to dbus_nb_getpeereid() credentials: %s\n", _dbus_strerror (errno));
+ }
#elif defined(LOCAL_CREDS)
pid_read = DBUS_PID_UNSET;
uid_read = cmsg.cred.sc_uid;
@@ -1851,7 +1907,7 @@ _dbus_read_credentials_socket (int
}
if (ucred != NULL)
ucred_free (ucred);
-#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED */
+#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED && !LOCAL_PEEREID */
_dbus_verbose ("Socket credentials not supported on this OS\n");
#endif
}
@@ -2528,6 +2584,10 @@ _dbus_poll (DBusPollFD *fds,
_DBUS_STRUCT_OFFSET (DBusPollFD, revents) ==
_DBUS_STRUCT_OFFSET (struct pollfd, revents))
{
+ if (timeout_milliseconds < -1) {
+ _dbus_warn("_dbus_poll: timeout = %d (fixed)\n", timeout_milliseconds);
+ timeout_milliseconds = -1;
+ }
return poll ((struct pollfd*) fds,
n_fds,
timeout_milliseconds);

View File

@@ -1,13 +1,13 @@
$NetBSD: patch-ak,v 1.2 2012/08/01 17:52:22 drochner Exp $
$NetBSD: patch-ak,v 1.3 2014/04/03 09:09:06 wiz Exp $
--- dbus/Makefile.in.orig 2012-07-26 16:44:07.000000000 +0000
--- dbus/Makefile.in.orig 2014-01-20 14:10:30.000000000 +0000
+++ dbus/Makefile.in
@@ -591,7 +591,7 @@ AM_CPPFLAGS = \
$(SYSTEMD_CFLAGS) \
$(VALGRIND_CFLAGS) \
-DDBUS_COMPILATION \
@@ -673,7 +673,7 @@ configdir = $(sysconfdir)/dbus-1
# results in an otherwise unnecessary dependency on librt. Disable it.
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(SYSTEMD_CFLAGS) \
$(VALGRIND_CFLAGS) -DDBUS_COMPILATION \
- -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
+ -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
-DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\" \
$(NULL)
$(NULL) -DSD_DAEMON_DISABLE_MQ

View File

@@ -1,17 +1,17 @@
$NetBSD: patch-ba,v 1.2 2012/08/01 17:52:22 drochner Exp $
$NetBSD: patch-ba,v 1.3 2014/04/03 09:09:06 wiz Exp $
--- tools/dbus-monitor.c.orig 2012-07-26 17:37:48.000000000 +0000
--- tools/dbus-monitor.c.orig 2013-10-09 10:22:07.000000000 +0000
+++ tools/dbus-monitor.c
@@ -107,7 +107,7 @@ monitor_filter_func (DBusConnection
#ifdef __APPLE__
#define PROFILE_TIMED_FORMAT "%s\t%lu\t%d"
@@ -110,7 +110,7 @@ monitor_filter_func (DBusConnection
#include <inttypes.h>
#define PROFILE_TIMED_FORMAT "%s\t%" PRId64 "\t%d"
#else
-#define PROFILE_TIMED_FORMAT "%s\t%lu\t%lu"
+#define PROFILE_TIMED_FORMAT "%s\t%llu\t%lu"
#endif
#define TRAP_NULL_STRING(str) ((str) ? (str) : "<none>")
@@ -127,7 +127,7 @@ static void
@@ -130,7 +130,7 @@ static void
profile_print_with_attrs (const char *type, DBusMessage *message,
struct timeval *t, ProfileAttributeFlags attrs)
{
@@ -20,7 +20,7 @@ $NetBSD: patch-ba,v 1.2 2012/08/01 17:52:22 drochner Exp $
if (attrs & PROFILE_ATTRIBUTE_FLAG_SERIAL)
printf ("\t%u", dbus_message_get_serial (message));
@@ -197,7 +197,7 @@ print_message_profile (DBusMessage *mess
@@ -200,7 +200,7 @@ print_message_profile (DBusMessage *mess
PROFILE_ATTRIBUTE_FLAG_MEMBER);
break;
default:

View File

@@ -0,0 +1,46 @@
$NetBSD: patch-bus_dir-watch-kqueue.c,v 1.2 2014/06/14 21:52:56 wiz Exp $
* For platforms missing O_CLOEXEC
https://bugs.freedesktop.org/show_bug.cgi?id=77032
--- bus/dir-watch-kqueue.c.orig 2014-01-25 12:39:24.000000000 +0000
+++ bus/dir-watch-kqueue.c
@@ -202,6 +202,9 @@ bus_set_watched_dirs (BusContext *contex
DBusList *link;
int i, j, fd;
struct kevent ev;
+#ifdef O_CLOEXEC
+ dbus_bool_t cloexec_done = 0;
+#endif
if (!_init_kqueue (context))
goto out;
@@ -259,7 +262,15 @@ bus_set_watched_dirs (BusContext *contex
/* FIXME - less lame error handling for failing to add a watch;
* we may need to sleep.
*/
+#ifdef O_CLOEXEC
fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC);
+ cloexec_done = (fd >= 0);
+
+ if (fd < 0 && errno == EINVAL)
+#endif
+ {
+ fd = open (new_dirs[i], O_RDONLY);
+ }
if (fd < 0)
{
if (errno != ENOENT)
@@ -274,6 +285,12 @@ bus_set_watched_dirs (BusContext *contex
continue;
}
}
+#ifdef O_CLOEXEC
+ if (!cloexec_done)
+#endif
+ {
+ _dbus_fd_set_close_on_exec (fd);
+ }
EV_SET (&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME, 0, 0);

View File

@@ -0,0 +1,81 @@
$NetBSD: patch-configure,v 1.3 2014/06/14 21:57:34 wiz Exp $
backtrace() may be in libexecinfo
From
https://bugs.freedesktop.org/attachment.cgi?id=100403
which is part of
https://bugs.freedesktop.org/show_bug.cgi?id=69702
--- configure.orig 2014-06-05 13:56:49.000000000 +0000
+++ configure
@@ -18860,16 +18860,63 @@ if test "x$ac_cv_header_execinfo_h" = xy
cat >>confdefs.h <<_ACEOF
#define HAVE_EXECINFO_H 1
_ACEOF
- for ac_func in backtrace
-do :
- ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace"
-if test "x$ac_cv_func_backtrace" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_BACKTRACE 1
-_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5
+$as_echo_n "checking for library containing backtrace... " >&6; }
+if ${ac_cv_search_backtrace+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char backtrace ();
+int
+main ()
+{
+return backtrace ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' execinfo; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_backtrace=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_backtrace+:} false; then :
+ break
fi
done
+if ${ac_cv_search_backtrace+:} false; then :
+
+else
+ ac_cv_search_backtrace=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5
+$as_echo "$ac_cv_search_backtrace" >&6; }
+ac_res=$ac_cv_search_backtrace
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h
+
+fi
fi

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-dbus_dbus-sysdeps-unix.c,v 1.2 2014/06/14 21:48:34 wiz Exp $
On Linux, poll accepts any negative value as infinity.
On at least FreeBSD and NetBSD, only -1 is acceptable.
https://bugs.freedesktop.org/show_bug.cgi?id=78480
--- dbus/dbus-sysdeps-unix.c.orig 2014-01-17 16:59:48.000000000 +0000
+++ dbus/dbus-sysdeps-unix.c
@@ -2555,6 +2555,10 @@ _dbus_poll (DBusPollFD *fds,
_DBUS_STRUCT_OFFSET (DBusPollFD, revents) ==
_DBUS_STRUCT_OFFSET (struct pollfd, revents))
{
+ if (timeout_milliseconds < -1)
+ {
+ timeout_milliseconds = -1;
+ }
return poll ((struct pollfd*) fds,
n_fds,
timeout_milliseconds);

View File

@@ -0,0 +1,57 @@
$NetBSD: patch-dbus_dbus-sysdeps-util-unix.c,v 1.3 2014/09/13 09:47:11 richard Exp $
add solaris specific console_user test
--- dbus/dbus-sysdeps-util-unix.c.orig 2014-01-25 12:39:25.000000000 +0000
+++ dbus/dbus-sysdeps-util-unix.c
@@ -54,6 +54,10 @@
#include <syslog.h>
#endif
+#if defined(__sun) && defined(__SVR4)
+#include <pwd.h>
+#endif
+
#ifdef HAVE_SYS_SYSLIMITS_H
#include <sys/syslimits.h>
#endif
@@ -556,8 +560,31 @@ _dbus_user_at_console (const char *usern
DBusString u, f;
dbus_bool_t result;
+#if defined(__sun) && defined(__SVR4)
+ struct passwd *passwd_entry;
+#endif
result = FALSE;
+
+#if defined(__sun) && defined(__SVR4)
+ passwd_entry = getpwnam (username);
+ if (passwd_entry != NULL)
+ {
+ struct stat st;
+ uid_t uid;
+
+ uid = passwd_entry->pw_uid;
+
+ if (stat ("/dev/vt/console_user", &st) == 0 && st.st_uid == uid)
+ {
+ /*
+ * Owner is allowed to take over. Before we have real
+ * ownership in HAL, assume it's the console owner.
+ */
+ result = TRUE;
+ }
+ }
+#else
if (!_dbus_string_init (&f))
{
_DBUS_SET_OOM (error);
@@ -582,6 +609,7 @@ _dbus_user_at_console (const char *usern
out:
_dbus_string_free (&f);
+#endif
return result;
}