update to 1.6.4 this is a step of two major branches, to much to list here pkgsrc notes: -I've left out our NETBSD_ATOMIC_OPS patch because it is very invasive and gcc intrinsics are hopefully good enough -A workaround for non-standard behavior of vsnprintf has been added upstream, for HPUX as the comment says. We had a patch for __hpux||__sgi which is removed now - the sgi case should be checked.diff -r1.53 -r1.54 pkgsrc/sysutils/dbus/Makefile
(drochner)
@@ -1,121 +1,120 @@ | @@ -1,121 +1,120 @@ | |||
1 | # $NetBSD: Makefile,v 1.53 2012/07/28 21:50:31 reed Exp $ | 1 | # $NetBSD: Makefile,v 1.54 2012/08/01 17:52:21 drochner Exp $ | |
2 | 2 | |||
3 | DISTNAME= dbus-1.2.4.6permissive | 3 | DISTNAME= dbus-1.6.4 | |
4 | PKGNAME= dbus-1.2.4.6 | |||
5 | PKGREVISION= 4 | |||
6 | CATEGORIES= sysutils | 4 | CATEGORIES= sysutils | |
7 | MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/ | 5 | MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/ | |
8 | 6 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 7 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.freedesktop.org/Software/dbus | 8 | HOMEPAGE= http://www.freedesktop.org/Software/dbus | |
11 | COMMENT= Message bus system | 9 | COMMENT= Message bus system | |
12 | LICENSE= gnu-gpl-v2 | 10 | LICENSE= gnu-gpl-v2 | |
13 | 11 | |||
14 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
15 | 13 | |||
16 | CONFLICTS+= dbus-glib<0.71 | 14 | CONFLICTS+= dbus-glib<0.71 | |
17 | CONFLICTS+= py*-dbus<0.71 | 15 | CONFLICTS+= py*-dbus<0.71 | |
18 | 16 | |||
19 | GNU_CONFIGURE= YES | 17 | GNU_CONFIGURE= YES | |
20 | USE_TOOLS+= gmake msgfmt pkg-config | 18 | USE_TOOLS+= gmake msgfmt pkg-config | |
21 | USE_LIBTOOL= YES | 19 | USE_LIBTOOL= YES | |
22 | 20 | |||
23 | PKGCONFIG_OVERRIDE= dbus-1.pc.in | 21 | PKGCONFIG_OVERRIDE= dbus-1.pc.in | |
24 | 22 | |||
25 | BUILD_DEFS+= VARBASE | 23 | BUILD_DEFS+= VARBASE | |
26 | 24 | |||
27 | OWN_DIRS_PERMS+= ${VARBASE}/db/dbus ${DBUS_USER} ${DBUS_GROUP} 0755 | 25 | OWN_DIRS_PERMS+= ${VARBASE}/db/dbus ${DBUS_USER} ${DBUS_GROUP} 0755 | |
28 | SPECIAL_PERMS+= libexec/dbus-daemon-launch-helper ${REAL_ROOT_USER} ${DBUS_GROUP} 4511 | 26 | SPECIAL_PERMS+= libexec/dbus-daemon-launch-helper ${REAL_ROOT_USER} ${DBUS_GROUP} 4511 | |
29 | 27 | |||
30 | .include "../../mk/bsd.prefs.mk" | 28 | .include "../../mk/bsd.prefs.mk" | |
31 | 29 | |||
32 | CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q} | 30 | CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q} | |
33 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | 31 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | |
32 | #CONFIGURE_ARGS+= --enable-embedded-tests | |||
34 | 33 | |||
35 | #CFLAGS.NetBSD+= -D_NETBSD_SOURCE | 34 | #CFLAGS.NetBSD+= -D_NETBSD_SOURCE | |
36 | 35 | |||
37 | CONFIGURE_ARGS_GROUPS= enable disable with without | 36 | CONFIGURE_ARGS_GROUPS= enable disable with without | |
38 | 37 | |||
39 | .if ${OPSYS} == "Darwin" | 38 | .if ${OPSYS} == "Darwin" | |
40 | CONFIGURE_ARGS+= --with-session-socket-dir=/tmp | 39 | CONFIGURE_ARGS+= --with-session-socket-dir=/tmp | |
41 | .endif | 40 | .endif | |
42 | 41 | |||
43 | CONFIGURE_ARGS.Linux= abstract-sockets dnotify selinux | 42 | CONFIGURE_ARGS.Linux= abstract-sockets dnotify selinux | |
44 | CONFIGURE_ARGS.docs= doxygen-docs xml-docs | 43 | CONFIGURE_ARGS.docs= doxygen-docs xml-docs | |
45 | 44 | |||
46 | CONFIGURE_ARGS.without+= init-scripts | 45 | CONFIGURE_ARGS.without+= init-scripts | |
47 | CONFIGURE_ARGS.disable= ansi gcov | 46 | CONFIGURE_ARGS.disable= ansi gcov | |
48 | CONFIGURE_ARGS.disable+= console-owner-file | 47 | CONFIGURE_ARGS.disable+= console-owner-file | |
49 | CONFIGURE_ARGS.disable+= ${CONFIGURE_ARGS.docs} | 48 | CONFIGURE_ARGS.disable+= ${CONFIGURE_ARGS.docs} | |
50 | CONFIGURE_ARGS.enable= checks static | 49 | CONFIGURE_ARGS.enable= checks static | |
51 | ### | 50 | ### | |
52 | ### XXX the spawn test hangs, and some of these tests may be bogus | 51 | ### XXX the spawn test hangs, and some of these tests may be bogus | |
53 | ### | 52 | ### | |
54 | #.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss]) | 53 | #.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss]) | |
55 | #PKG_OPTIONS.dbus+= debug | 54 | #PKG_OPTIONS.dbus+= debug | |
56 | #TEST_TARGET= check | 55 | #TEST_TARGET= check | |
57 | #.endif | 56 | #.endif | |
58 | 57 | |||
59 | CONFIGURE_ARGS.with= dbus-user=${DBUS_USER} | 58 | CONFIGURE_ARGS.with= dbus-user=${DBUS_USER} | |
60 | CONFIGURE_ARGS.with+= test-socket-dir=${WRKDIR:Q} | 59 | CONFIGURE_ARGS.with+= test-socket-dir=${WRKDIR:Q} | |
61 | CONFIGURE_ARGS.with+= xml=expat | 60 | CONFIGURE_ARGS.with+= xml=expat | |
62 | 61 | |||
63 | PTHREAD_AUTO_VARS= yes | 62 | PTHREAD_AUTO_VARS= yes | |
64 | 63 | |||
65 | .if ${OPSYS} == "Linux" | 64 | .if ${OPSYS} == "Linux" | |
66 | PLIST.linux= yes | 65 | PLIST.linux= yes | |
67 | .else | 66 | .else | |
68 | CONFIGURE_ARGS.disable+=\ | 67 | CONFIGURE_ARGS.disable+=\ | |
69 | ${CONFIGURE_ARGS.Linux} | 68 | ${CONFIGURE_ARGS.Linux} | |
70 | .endif | 69 | .endif | |
71 | 70 | |||
72 | PLIST_VARS+= linux | 71 | PLIST_VARS+= linux | |
73 | 72 | |||
74 | CONFIGURE_ARGS+=\ | 73 | CONFIGURE_ARGS+=\ | |
75 | ${CONFIGURE_ARGS_GROUPS:@.g.@ \ | 74 | ${CONFIGURE_ARGS_GROUPS:@.g.@ \ | |
76 | ${CONFIGURE_ARGS.${.g.}:@.a.@ \ | 75 | ${CONFIGURE_ARGS.${.g.}:@.a.@ \ | |
77 | --${.g.}-${.a.} \ | 76 | --${.g.}-${.a.} \ | |
78 | @} \ | 77 | @} \ | |
79 | @:M*} | 78 | @:M*} | |
80 | 79 | |||
81 | MAKE_DIRS= ${PKG_SYSCONFDIR}/dbus-1/event.d | 80 | MAKE_DIRS= ${PKG_SYSCONFDIR}/dbus-1/event.d | |
82 | MAKE_DIRS+= ${PKG_SYSCONFDIR}/dbus-1/system.d | 81 | MAKE_DIRS+= ${PKG_SYSCONFDIR}/dbus-1/system.d | |
83 | MAKE_DIRS+= ${PKG_SYSCONFDIR}/dbus-1/session.d | 82 | MAKE_DIRS+= ${PKG_SYSCONFDIR}/dbus-1/session.d | |
84 | 83 | |||
85 | EGDIR= ${PREFIX}/share/examples/dbus | 84 | EGDIR= ${PREFIX}/share/examples/dbus | |
86 | CONF_FILES= ${EGDIR}/session.conf ${PKG_SYSCONFDIR}/dbus-1/session.conf | 85 | CONF_FILES= ${EGDIR}/session.conf ${PKG_SYSCONFDIR}/dbus-1/session.conf | |
87 | CONF_FILES+= ${EGDIR}/system.conf ${PKG_SYSCONFDIR}/dbus-1/system.conf | 86 | CONF_FILES+= ${EGDIR}/system.conf ${PKG_SYSCONFDIR}/dbus-1/system.conf | |
88 | 87 | |||
89 | RCD_SCRIPTS= dbus | 88 | RCD_SCRIPTS= dbus | |
90 | 89 | |||
91 | PKG_GROUPS_VARS+= DBUS_GROUP | 90 | PKG_GROUPS_VARS+= DBUS_GROUP | |
92 | PKG_USERS_VARS+= DBUS_USER | 91 | PKG_USERS_VARS+= DBUS_USER | |
93 | 92 | |||
94 | PKG_GROUPS= ${DBUS_GROUP} | 93 | PKG_GROUPS= ${DBUS_GROUP} | |
95 | PKG_USERS= ${DBUS_USER}:${DBUS_GROUP} | 94 | PKG_USERS= ${DBUS_USER}:${DBUS_GROUP} | |
96 | PKG_GECOS.${DBUS_USER}= System message bus | 95 | PKG_GECOS.${DBUS_USER}= System message bus | |
97 | PKG_HOME.${DBUS_USER}= ${VARBASE}/run/dbus | 96 | PKG_HOME.${DBUS_USER}= ${VARBASE}/run/dbus | |
98 | 97 | |||
99 | FILES_SUBST+= DBUS_USER=${DBUS_USER} | 98 | FILES_SUBST+= DBUS_USER=${DBUS_USER} | |
100 | FILES_SUBST+= DBUS_GROUP=${DBUS_GROUP} | 99 | FILES_SUBST+= DBUS_GROUP=${DBUS_GROUP} | |
101 | 100 | |||
102 | BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections | 101 | BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections | |
103 | # Package tries to use these if gcc accepts them, but that doesn't | 102 | # Package tries to use these if gcc accepts them, but that doesn't | |
104 | # mean that we universally can *run* the executables | 103 | # mean that we universally can *run* the executables | |
105 | BUILDLINK_TRANSFORM+= rm:-fPIE | 104 | BUILDLINK_TRANSFORM+= rm:-fPIE | |
106 | BUILDLINK_TRANSFORM+= rm:-pie | 105 | BUILDLINK_TRANSFORM+= rm:-pie | |
107 | 106 | |||
108 | .include "options.mk" | 107 | .include "options.mk" | |
109 | 108 | |||
110 | .if ${OPSYS} == "Linux" | 109 | .if ${OPSYS} == "Linux" | |
111 | post-install: | 110 | post-install: | |
112 | ${INSTALL_DATA} ${WRKSRC}/bus/rc.messagebus \ | 111 | ${INSTALL_DATA} ${WRKSRC}/bus/rc.messagebus \ | |
113 | ${DESTDIR}${PREFIX}/share/examples/rc.d/rc.messagebus.slackware | 112 | ${DESTDIR}${PREFIX}/share/examples/rc.d/rc.messagebus.slackware | |
114 | ${INSTALL_DATA} ${WRKSRC}/bus/messagebus \ | 113 | ${INSTALL_DATA} ${WRKSRC}/bus/messagebus \ | |
115 | ${DESTDIR}${PREFIX}/share/examples/rc.d/messagebus.redhat | 114 | ${DESTDIR}${PREFIX}/share/examples/rc.d/messagebus.redhat | |
116 | .endif | 115 | .endif | |
117 | 116 | |||
118 | .include "../../mk/pthread.buildlink3.mk" | 117 | .include "../../mk/pthread.buildlink3.mk" | |
119 | .include "../../devel/gettext-lib/buildlink3.mk" | 118 | .include "../../devel/gettext-lib/buildlink3.mk" | |
120 | .include "../../textproc/expat/buildlink3.mk" | 119 | .include "../../textproc/expat/buildlink3.mk" | |
121 | .include "../../mk/bsd.pkg.mk" | 120 | .include "../../mk/bsd.pkg.mk" |
@@ -1,38 +1,46 @@ | @@ -1,38 +1,46 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.14 2011/10/29 13:26:59 marino Exp $ | 1 | @comment $NetBSD: PLIST,v 1.15 2012/08/01 17:52:21 drochner Exp $ | |
2 | bin/dbus-cleanup-sockets | 2 | bin/dbus-cleanup-sockets | |
3 | bin/dbus-daemon | 3 | bin/dbus-daemon | |
4 | bin/dbus-launch | 4 | bin/dbus-launch | |
5 | bin/dbus-monitor | 5 | bin/dbus-monitor | |
6 | bin/dbus-send | 6 | bin/dbus-send | |
7 | bin/dbus-uuidgen | 7 | bin/dbus-uuidgen | |
8 | include/dbus-1.0/dbus/dbus-address.h | 8 | include/dbus-1.0/dbus/dbus-address.h | |
9 | include/dbus-1.0/dbus/dbus-bus.h | 9 | include/dbus-1.0/dbus/dbus-bus.h | |
10 | include/dbus-1.0/dbus/dbus-connection.h | 10 | include/dbus-1.0/dbus/dbus-connection.h | |
11 | include/dbus-1.0/dbus/dbus-errors.h | 11 | include/dbus-1.0/dbus/dbus-errors.h | |
12 | include/dbus-1.0/dbus/dbus-macros.h | 12 | include/dbus-1.0/dbus/dbus-macros.h | |
13 | include/dbus-1.0/dbus/dbus-memory.h | 13 | include/dbus-1.0/dbus/dbus-memory.h | |
14 | include/dbus-1.0/dbus/dbus-message.h | 14 | include/dbus-1.0/dbus/dbus-message.h | |
15 | include/dbus-1.0/dbus/dbus-misc.h | 15 | include/dbus-1.0/dbus/dbus-misc.h | |
16 | include/dbus-1.0/dbus/dbus-pending-call.h | 16 | include/dbus-1.0/dbus/dbus-pending-call.h | |
17 | include/dbus-1.0/dbus/dbus-protocol.h | 17 | include/dbus-1.0/dbus/dbus-protocol.h | |
18 | include/dbus-1.0/dbus/dbus-server.h | 18 | include/dbus-1.0/dbus/dbus-server.h | |
19 | include/dbus-1.0/dbus/dbus-shared.h | 19 | include/dbus-1.0/dbus/dbus-shared.h | |
20 | include/dbus-1.0/dbus/dbus-signature.h | 20 | include/dbus-1.0/dbus/dbus-signature.h | |
21 | include/dbus-1.0/dbus/dbus-syntax.h | |||
21 | include/dbus-1.0/dbus/dbus-threads.h | 22 | include/dbus-1.0/dbus/dbus-threads.h | |
22 | include/dbus-1.0/dbus/dbus-types.h | 23 | include/dbus-1.0/dbus/dbus-types.h | |
23 | include/dbus-1.0/dbus/dbus.h | 24 | include/dbus-1.0/dbus/dbus.h | |
24 | lib/dbus-1.0/include/dbus/dbus-arch-deps.h | 25 | lib/dbus-1.0/include/dbus/dbus-arch-deps.h | |
25 | lib/libdbus-1.la | 26 | lib/libdbus-1.la | |
26 | lib/pkgconfig/dbus-1.pc | 27 | lib/pkgconfig/dbus-1.pc | |
27 | libexec/dbus-daemon-launch-helper | 28 | libexec/dbus-daemon-launch-helper | |
28 | man/man1/dbus-cleanup-sockets.1 | 29 | man/man1/dbus-cleanup-sockets.1 | |
29 | man/man1/dbus-daemon.1 | 30 | man/man1/dbus-daemon.1 | |
30 | man/man1/dbus-launch.1 | 31 | man/man1/dbus-launch.1 | |
31 | man/man1/dbus-monitor.1 | 32 | man/man1/dbus-monitor.1 | |
32 | man/man1/dbus-send.1 | 33 | man/man1/dbus-send.1 | |
33 | man/man1/dbus-uuidgen.1 | 34 | man/man1/dbus-uuidgen.1 | |
35 | share/doc/dbus/dbus-faq.html | |||
36 | share/doc/dbus/dbus-specification.html | |||
37 | share/doc/dbus/dbus-test-plan.html | |||
38 | share/doc/dbus/dbus-tutorial.html | |||
39 | share/doc/dbus/diagram.png | |||
40 | share/doc/dbus/diagram.svg | |||
41 | share/doc/dbus/system-activation.txt | |||
34 | share/examples/dbus/session.conf | 42 | share/examples/dbus/session.conf | |
35 | share/examples/dbus/system.conf | 43 | share/examples/dbus/system.conf | |
36 | share/examples/rc.d/dbus | 44 | share/examples/rc.d/dbus | |
37 | ${PLIST.linux}share/examples/rc.d/messagebus.redhat | 45 | ${PLIST.linux}share/examples/rc.d/messagebus.redhat | |
38 | ${PLIST.linux}share/examples/rc.d/rc.messagebus.slackware | 46 | ${PLIST.linux}share/examples/rc.d/rc.messagebus.slackware |
@@ -1,18 +1,11 @@ | @@ -1,18 +1,11 @@ | |||
1 | $NetBSD: distinfo,v 1.38 2012/03/30 14:28:29 obache Exp $ | 1 | $NetBSD: distinfo,v 1.39 2012/08/01 17:52:21 drochner Exp $ | |
2 | 2 | |||
3 | SHA1 (dbus-1.2.4.6permissive.tar.gz) = f71219624885fe2ec1990bb8bdd599e184dd5774 | 3 | SHA1 (dbus-1.6.4.tar.gz) = 17e619f008301592b7f01a60e7cf18e2752b5270 | |
4 | RMD160 (dbus-1.2.4.6permissive.tar.gz) = 05d1c5fae8ae763a9beb8c7d6f390f3ff54e9c30 | 4 | RMD160 (dbus-1.6.4.tar.gz) = 041ad41c26f38647f3da8d7f0cb548c979521def | |
5 | Size (dbus-1.2.4.6permissive.tar.gz) = 1575270 bytes | 5 | Size (dbus-1.6.4.tar.gz) = 1927446 bytes | |
6 | SHA1 (patch-CVE-2010-4352-1) = bc83f7a2b56558b6514de8de2d6319ad84f84fce | 6 | SHA1 (patch-aa) = 0c3d145979e3b2358261c9f7f34701d02eb6ecd4 | |
7 | SHA1 (patch-CVE-2010-4352-2) = 1427c2c4aea6cd21f5d19aa8fad90b87282b232b | 7 | SHA1 (patch-ab) = 1edd2dfd566b96a8908af2efa37d905919f07713 | |
8 | SHA1 (patch-CVE-2010-4352-3) = d5598dab11bad66c2f586e418a8b409ac5fc67d5 | 8 | SHA1 (patch-ak) = fcb0cad1b6e306db03d538d4ca65f4a18d4726ab | |
9 | SHA1 (patch-CVE-2010-4352-4) = 82a43bc19bf4ef73d6e2909dd1c948798585135d | 9 | SHA1 (patch-al) = 3f9f793b0c1455bf2bf079cc27b841c22f42c276 | |
10 | SHA1 (patch-CVE-2011-2200) = 99e991dd51312fb7181f12c1c5d3b87897e417ac | |||
11 | SHA1 (patch-aa) = fd7cc2e11e15e13885e882e8de51e17af8a63d70 | |||
12 | SHA1 (patch-ab) = e08250a12e6c04c69278c03078a817159592b3d0 | |||
13 | SHA1 (patch-ac) = 63aab0ffac02a9cb85a80e31bbb1234534db378b | |||
14 | SHA1 (patch-ag) = 999071b782982c12329025ea8e393bfed940b654 | |||
15 | SHA1 (patch-ai) = a45bd8d29955e9c14a4d8b3f44b42242d70c1cd8 | |||
16 | SHA1 (patch-ak) = 56c0a917e770b8d6ffc37ec7ab8beb631dd8ef72 | |||
17 | SHA1 (patch-al) = fad2f4df4537b2a3e21aaef29138060724ba8286 | |||
18 | SHA1 (patch-am) = 8c794ff8b0981e90243ee20c26ae1ecc72e68de8 | 10 | SHA1 (patch-am) = 8c794ff8b0981e90243ee20c26ae1ecc72e68de8 | |
11 | SHA1 (patch-ba) = ceb8e0c424c57410f8c3775087e4cae1b44da4c5 |
@@ -1,36 +1,36 @@ | @@ -1,36 +1,36 @@ | |||
1 | # $NetBSD: options.mk,v 1.5 2010/12/05 18:29:17 asau Exp $ | 1 | # $NetBSD: options.mk,v 1.6 2012/08/01 17:52:21 drochner Exp $ | |
2 | 2 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.dbus | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.dbus | |
4 | PKG_SUPPORTED_OPTIONS+= debug x11 | 4 | PKG_SUPPORTED_OPTIONS+= debug x11 | |
5 | PKG_SUGGESTED_OPTIONS= x11 | 5 | PKG_SUGGESTED_OPTIONS= x11 | |
6 | 6 | |||
7 | .if (${OPSYS} == "NetBSD" || \ | 7 | .if (${OPSYS} == "NetBSD" || \ | |
8 | ${OPSYS} == "FreeBSD" || \ | 8 | ${OPSYS} == "FreeBSD" || \ | |
9 | ${OPSYS} == "OpenBSD" || \ | 9 | ${OPSYS} == "OpenBSD" || \ | |
10 | ${OPSYS} == "DragonFly") | 10 | ${OPSYS} == "DragonFly") | |
11 | PKG_SUPPORTED_OPTIONS+= kqueue | 11 | PKG_SUPPORTED_OPTIONS+= kqueue | |
12 | PKG_SUGGESTED_OPTIONS+= kqueue | 12 | PKG_SUGGESTED_OPTIONS+= kqueue | |
13 | .endif | 13 | .endif | |
14 | 14 | |||
15 | .include "../../mk/bsd.options.mk" | 15 | .include "../../mk/bsd.options.mk" | |
16 | 16 | |||
17 | .if !empty(PKG_OPTIONS:Mdebug) | 17 | .if !empty(PKG_OPTIONS:Mdebug) | |
18 | CONFIGURE_ARGS.enable+= asserts tests verbose-mode | 18 | CONFIGURE_ARGS.enable+= asserts verbose-mode | |
19 | .else | 19 | .else | |
20 | CONFIGURE_ARGS.disable+= asserts tests verbose-mode | 20 | CONFIGURE_ARGS.disable+= asserts verbose-mode | |
21 | .endif | 21 | .endif | |
22 | 22 | |||
23 | .if !empty(PKG_OPTIONS:Mkqueue) | 23 | .if !empty(PKG_OPTIONS:Mkqueue) | |
24 | CONFIGURE_ARGS.enable+= kqueue | 24 | CONFIGURE_ARGS.enable+= kqueue | |
25 | .else | 25 | .else | |
26 | CONFIGURE_ARGS.disable+= kqueue | 26 | CONFIGURE_ARGS.disable+= kqueue | |
27 | .endif | 27 | .endif | |
28 | 28 | |||
29 | .if !empty(PKG_OPTIONS:Mx11) | 29 | .if !empty(PKG_OPTIONS:Mx11) | |
30 | CONFIGURE_ARGS.with+= x | 30 | CONFIGURE_ARGS.with+= x | |
31 | . include "../../x11/libX11/buildlink3.mk" | 31 | . include "../../x11/libX11/buildlink3.mk" | |
32 | BUILDLINK_DEPMETHOD.libXt= build | 32 | BUILDLINK_DEPMETHOD.libXt= build | |
33 | . include "../../x11/libXt/buildlink3.mk" | 33 | . include "../../x11/libXt/buildlink3.mk" | |
34 | .else | 34 | .else | |
35 | CONFIGURE_ARGS.without= x | 35 | CONFIGURE_ARGS.without= x | |
36 | .endif | 36 | .endif |
@@ -1,35 +1,42 @@ | @@ -1,35 +1,42 @@ | |||
1 | $NetBSD: patch-aa,v 1.10 2009/01/07 19:11:36 wiz Exp $ | 1 | $NetBSD: patch-aa,v 1.11 2012/08/01 17:52:22 drochner Exp $ | |
2 | 2 | |||
3 | --- bus/Makefile.in.orig 2008-12-18 21:47:13.000000000 +0100 | 3 | --- bus/Makefile.in.orig 2012-07-26 16:39:09.000000000 +0000 | |
4 | +++ bus/Makefile.in | 4 | +++ bus/Makefile.in | |
5 | @@ -415,9 +415,10 @@ target_vendor = @target_vendor@ | 5 | @@ -500,7 +500,8 @@ target_alias = @target_alias@ | |
6 | top_build_prefix = @top_build_prefix@ | 6 | top_build_prefix = @top_build_prefix@ | |
7 | top_builddir = @top_builddir@ | 7 | top_builddir = @top_builddir@ | |
8 | top_srcdir = @top_srcdir@ | 8 | top_srcdir = @top_srcdir@ | |
9 | -configdir = $(sysconfdir)/dbus-1 | 9 | -configdir = $(sysconfdir)/dbus-1 | |
10 | +etcconfigdir = $(sysconfdir)/dbus-1 | 10 | +etcconfigdir = $(sysconfdir)/dbus-1 | |
11 | +configdir = $(datadir)/examples/@PACKAGE@ | 11 | +configdir = $(datadir)/examples/@PACKAGE@ | |
12 | INCLUDES = -I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \ | 12 | dbus_daemon_execdir = $(DBUS_DAEMONDIR) | |
13 | - -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ | 13 | DBUS_BUS_LIBS = \ | |
14 | + -DDBUS_SYSTEM_CONFIG_FILE=\""$(etcconfigdir)/system.conf"\" \ | 14 | $(XML_LIBS) \ | |
15 | -DDAEMON_NAME=\"dbus-daemon\" -DDBUS_COMPILATION | 15 | @@ -519,7 +520,7 @@ DBUS_LAUNCHER_LIBS = \ | |
16 | AM_CPPFLAGS = \ | |||
17 | -I$(top_srcdir) \ | |||
18 | $(XML_CFLAGS) \ | |||
19 | - -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ | |||
20 | + -DDBUS_SYSTEM_CONFIG_FILE=\""$(etcconfigdir)/system.conf"\" \ | |||
21 | -DDBUS_COMPILATION \ | |||
22 | -DDBUS_STATIC_BUILD \ | |||
23 | $(NULL) | |||
24 | @@ -1510,9 +1511,6 @@ clean-local: | |||
25 | /bin/rm *.bb *.bbg *.da *.gcov || true | |||
16 | 26 | |||
17 | EFENCE = | 27 | install-data-hook: | |
18 | @@ -1294,16 +1295,13 @@ install-data-hook: | |||
19 | chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ | |||
20 | fi | |||
21 | $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR) | |||
22 | - $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus | 28 | - $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus | |
23 | - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d | 29 | - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d | |
24 | - $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d | 30 | - $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d | |
25 | $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services | 31 | $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services | |
26 | $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services | 32 | $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services | |
27 | $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1 | 33 | # Install dbus.socket as default implementation of a D-Bus stack. | |
28 | $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir) | 34 | @@ -1529,7 +1527,7 @@ install-data-hook: | |
29 | if test `id -u` -eq 0; then \ | 35 | @DBUS_UNIX_TRUE@install-exec-hook: | |
30 | chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ | 36 | @DBUS_UNIX_TRUE@ if test `id -u` -eq 0; then \ | |
31 | - chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ | 37 | @DBUS_UNIX_TRUE@ chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ | |
32 | + chmod 4550 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ | 38 | -@DBUS_UNIX_TRUE@ chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ | |
33 | else \ | 39 | +@DBUS_UNIX_TRUE@ chmod 4550 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ | |
34 | echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \ | 40 | @DBUS_UNIX_TRUE@ else \ | |
35 | echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \ | 41 | @DBUS_UNIX_TRUE@ echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \ | |
42 | @DBUS_UNIX_TRUE@ echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \ |
@@ -1,263 +1,136 @@ | @@ -1,263 +1,136 @@ | |||
1 | $NetBSD: patch-ab,v 1.18 2012/03/30 14:28:29 obache Exp $ | 1 | $NetBSD: patch-ab,v 1.19 2012/08/01 17:52:22 drochner Exp $ | |
2 | 2 | |||
3 | --- dbus/dbus-sysdeps-unix.c.orig 2009-05-05 20:51:37.000000000 +0000 | 3 | --- dbus/dbus-sysdeps-unix.c.orig 2012-07-03 18:02:45.000000000 +0000 | |
4 | +++ dbus/dbus-sysdeps-unix.c | 4 | +++ dbus/dbus-sysdeps-unix.c | |
5 | @@ -23,6 +23,7 @@ | 5 | @@ -22,6 +22,8 @@ | |
6 | * | |||
6 | */ | 7 | */ | |
7 | 8 | |||
8 | #define _GNU_SOURCE | |||
9 | +#define _NETBSD_SOURCE | 9 | +#define _NETBSD_SOURCE | |
10 | + | |||
11 | #include <config.h> | |||
10 | 12 | |||
11 | #include "dbus-internals.h" | 13 | #include "dbus-internals.h" | |
12 | #include "dbus-sysdeps.h" | 14 | @@ -72,6 +74,10 @@ | |
13 | @@ -35,6 +36,9 @@ | |||
14 | #include "dbus-list.h" | |||
15 | #include "dbus-credentials.h" | |||
16 | ||||
17 | +#ifdef HAVE_NETBSD_ATOMIC_OPS | |||
18 | +#include <sys/atomic.h> | |||
19 | +#endif | |||
20 | #include <sys/types.h> | |||
21 | #include <stdlib.h> | |||
22 | #include <string.h> | |||
23 | @@ -71,6 +75,10 @@ | |||
24 | #include <ucred.h> | 15 | #include <ucred.h> | |
25 | #endif | 16 | #endif | |
26 | 17 | |||
27 | +#ifdef __NetBSD__ | 18 | +#ifdef __NetBSD__ | |
28 | +#include <sys/un.h> | 19 | +#include <sys/un.h> | |
29 | +#endif | 20 | +#endif | |
30 | + | 21 | + | |
31 | #ifdef HAVE_ADT | 22 | #ifdef HAVE_ADT | |
32 | #include <bsm/adt.h> | 23 | #include <bsm/adt.h> | |
33 | #endif | 24 | #endif | |
34 | @@ -87,6 +95,32 @@ | 25 | @@ -122,6 +128,32 @@ | |
35 | #define socklen_t int | 26 | ||
36 | #endif | 27 | #endif /* Solaris */ | |
37 | 28 | |||
38 | +#ifdef LOCAL_PEEREID | 29 | +#ifdef LOCAL_PEEREID | |
39 | +static dbus_bool_t | 30 | +static dbus_bool_t | |
40 | +dbus_nb_getpeereid(int fd, pid_t *pid, uid_t *uid, gid_t *gid) | 31 | +dbus_nb_getpeereid(int fd, pid_t *pid, uid_t *uid, gid_t *gid) | |
41 | +{ | 32 | +{ | |
42 | + struct unpcbid cred; | 33 | + struct unpcbid cred; | |
43 | + socklen_t len = sizeof(cred); | 34 | + socklen_t len = sizeof(cred); | |
44 | + | 35 | + | |
45 | + _dbus_verbose ("dbus_nb_getpeereid: enter, fd=%d\n"); | 36 | + _dbus_verbose ("dbus_nb_getpeereid: enter, fd=%d\n"); | |
46 | + if (getsockopt (fd, 0, LOCAL_PEEREID, &cred, &len) < 0) | 37 | + if (getsockopt (fd, 0, LOCAL_PEEREID, &cred, &len) < 0) | |
47 | + { | 38 | + { | |
48 | + _dbus_verbose ("dbus_nb_getpeereid: getsockopt LOCAL_PEEREID failed: %s\n", strerror(errno)); | 39 | + _dbus_verbose ("dbus_nb_getpeereid: getsockopt LOCAL_PEEREID failed: %s\n", strerror(errno)); | |
49 | + return FALSE; | 40 | + return FALSE; | |
50 | + } | 41 | + } | |
51 | + if (pid) | 42 | + if (pid) | |
52 | + *pid = cred.unp_pid; | 43 | + *pid = cred.unp_pid; | |
53 | + if (uid) | 44 | + if (uid) | |
54 | + *uid = cred.unp_euid; | 45 | + *uid = cred.unp_euid; | |
55 | + if (gid) | 46 | + if (gid) | |
56 | + *gid = cred.unp_egid; | 47 | + *gid = cred.unp_egid; | |
57 | + | 48 | + | |
58 | + _dbus_verbose ("dbus_nb_getpeereid: returning TRUE, pid=%d uid=%d gid=%d\n", | 49 | + _dbus_verbose ("dbus_nb_getpeereid: returning TRUE, pid=%d uid=%d gid=%d\n", | |
59 | + cred.unp_pid, cred.unp_euid, cred.unp_egid); | 50 | + cred.unp_pid, cred.unp_euid, cred.unp_egid); | |
60 | + return TRUE; | 51 | + return TRUE; | |
61 | +} | 52 | +} | |
62 | +#endif | 53 | +#endif | |
63 | + | 54 | + | |
64 | static dbus_bool_t | 55 | static dbus_bool_t | |
65 | _dbus_open_socket (int *fd_p, | 56 | _dbus_open_socket (int *fd_p, | |
66 | int domain, | 57 | int domain, | |
67 | @@ -581,7 +615,7 @@ _dbus_set_local_creds (int fd, dbus_bool | 58 | @@ -969,7 +1001,7 @@ _dbus_set_local_creds (int fd, dbus_bool | |
68 | { | 59 | { | |
69 | dbus_bool_t retval = TRUE; | 60 | dbus_bool_t retval = TRUE; | |
70 | 61 | |||
71 | -#if defined(HAVE_CMSGCRED) | 62 | -#if defined(HAVE_CMSGCRED) | |
72 | +#if defined(HAVE_CMSGCRED) || defined(LOCAL_PEEREID) | 63 | +#if defined(HAVE_CMSGCRED) || defined(LOCAL_PEEREID) | |
73 | /* NOOP just to make sure only one codepath is used | 64 | /* NOOP just to make sure only one codepath is used | |
74 | * and to prefer CMSGCRED | 65 | * and to prefer CMSGCRED | |
75 | */ | 66 | */ | |
76 | @@ -1041,9 +1075,9 @@ write_credentials_byte (int | 67 | @@ -1674,6 +1706,11 @@ _dbus_read_credentials_socket (int | |
77 | int bytes_written; | 68 | char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; | |
78 | char buf[1] = { '\0' }; | |||
79 | #if defined(HAVE_CMSGCRED) | |||
80 | - struct { | |||
81 | + union { | |||
82 | struct cmsghdr hdr; | |||
83 | - struct cmsgcred cred; | |||
84 | + char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; | |||
85 | } cmsg; | |||
86 | struct iovec iov; | |||
87 | struct msghdr msg; | |||
88 | @@ -1054,10 +1088,10 @@ write_credentials_byte (int | |||
89 | msg.msg_iov = &iov; | |||
90 | msg.msg_iovlen = 1; | |||
91 | ||||
92 | - msg.msg_control = &cmsg; | |||
93 | - msg.msg_controllen = sizeof (cmsg); | |||
94 | + msg.msg_control = (caddr_t) &cmsg; | |||
95 | + msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); | |||
96 | memset (&cmsg, 0, sizeof (cmsg)); | |||
97 | - cmsg.hdr.cmsg_len = sizeof (cmsg); | |||
98 | + cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred)); | |||
99 | cmsg.hdr.cmsg_level = SOL_SOCKET; | |||
100 | cmsg.hdr.cmsg_type = SCM_CREDS; | |||
101 | #endif | |||
102 | @@ -1129,15 +1163,15 @@ _dbus_read_credentials_socket (int | |||
103 | dbus_pid_t pid_read; | |||
104 | int bytes_read; | |||
105 | ||||
106 | - uid_read = DBUS_UID_UNSET; | |||
107 | - pid_read = DBUS_PID_UNSET; | |||
108 | - | |||
109 | #ifdef HAVE_CMSGCRED | |||
110 | - struct { | |||
111 | + union { | |||
112 | struct cmsghdr hdr; | |||
113 | - struct cmsgcred cred; | |||
114 | + char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; | |||
115 | } cmsg; | 69 | } cmsg; | |
116 | 70 | |||
117 | +#elif defined(LOCAL_PEEREID) | 71 | +#elif defined(LOCAL_PEEREID) | |
118 | + pid_t sockpid, sockuid, sockgid; | 72 | + pid_t sockpid; | |
73 | + uid_t sockuid; | |||
74 | + gid_t sockgid; | |||
119 | + | 75 | + | |
120 | #elif defined(LOCAL_CREDS) | 76 | #elif defined(LOCAL_CREDS) | |
121 | struct { | 77 | struct { | |
122 | struct cmsghdr hdr; | 78 | struct cmsghdr hdr; | |
123 | @@ -1145,6 +1179,9 @@ _dbus_read_credentials_socket (int | 79 | @@ -1709,10 +1746,15 @@ _dbus_read_credentials_socket (int | |
124 | } cmsg; | |||
125 | #endif | |||
126 | ||||
127 | + uid_read = DBUS_UID_UNSET; | |||
128 | + pid_read = DBUS_PID_UNSET; | |||
129 | + | |||
130 | _DBUS_ASSERT_ERROR_IS_CLEAR (error); | |||
131 | ||||
132 | /* The POSIX spec certainly doesn't promise this, but | |||
133 | @@ -1170,11 +1207,16 @@ _dbus_read_credentials_socket (int | |||
134 | msg.msg_iov = &iov; | 80 | msg.msg_iov = &iov; | |
135 | msg.msg_iovlen = 1; | 81 | msg.msg_iovlen = 1; | |
136 | 82 | |||
137 | -#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS) | 83 | -#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS) | |
138 | +#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID) | 84 | +#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID) | |
139 | memset (&cmsg, 0, sizeof (cmsg)); | 85 | _DBUS_ZERO(cmsg); | |
140 | +#ifdef HAVE_CMSGCRED | 86 | +#ifdef HAVE_CMSGCRED | |
141 | + msg.msg_control = (caddr_t) &cmsg; | 87 | msg.msg_control = (caddr_t) &cmsg; | |
142 | + msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); | 88 | msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); | |
143 | +#else /* defined(LOCAL_CREDS) */ | 89 | +#else /* defined(LOCAL_CREDS) */ | |
144 | msg.msg_control = &cmsg; | 90 | + msg.msg_control = &cmsg; | |
145 | msg.msg_controllen = sizeof (cmsg); | 91 | + msg.msg_controllen = sizeof (cmsg); | |
146 | #endif | |||
147 | +#endif | 92 | +#endif | |
93 | #endif | |||
148 | 94 | |||
149 | again: | 95 | again: | |
150 | bytes_read = recvmsg (client_fd, &msg, 0); | 96 | @@ -1749,9 +1791,13 @@ _dbus_read_credentials_socket (int | |
151 | @@ -1210,8 +1252,12 @@ _dbus_read_credentials_socket (int | |||
152 | return FALSE; | 97 | return FALSE; | |
153 | } | 98 | } | |
154 | 99 | |||
155 | -#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS) | 100 | -#if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS) | |
156 | +#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID) | 101 | +#if (defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)) && !defined(LOCAL_PEEREID) | |
157 | +#ifdef HAVE_CMSGCRED | 102 | +#ifdef HAVE_CMSGCRED | |
158 | + if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || cmsg.hdr.cmsg_type != SCM_CREDS) | 103 | if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) | |
104 | || cmsg.hdr.cmsg_type != SCM_CREDS) | |||
159 | +#else /* defined(LOCAL_CREDS) */ | 105 | +#else /* defined(LOCAL_CREDS) */ | |
160 | if (cmsg.hdr.cmsg_len < sizeof (cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) | 106 | + if (cmsg.hdr.cmsg_len < sizeof (cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) | |
161 | +#endif | 107 | +#endif | |
162 | { | 108 | { | |
163 | dbus_set_error (error, DBUS_ERROR_FAILED, | 109 | dbus_set_error (error, DBUS_ERROR_FAILED, | |
164 | "Message from recvmsg() was not SCM_CREDS"); | 110 | "Message from recvmsg() was not SCM_CREDS"); | |
165 | @@ -1223,7 +1269,11 @@ _dbus_read_credentials_socket (int | 111 | @@ -1787,6 +1833,16 @@ _dbus_read_credentials_socket (int | |
166 | 112 | cred = (struct cmsgcred *) CMSG_DATA (&cmsg.hdr); | ||
167 | { | 113 | pid_read = cred->cmcred_pid; | |
168 | #ifdef SO_PEERCRED | 114 | uid_read = cred->cmcred_euid; | |
169 | +#ifdef __OpenBSD__ | |||
170 | + struct sockpeercred cr; | |||
171 | +#else | |||
172 | struct ucred cr; | |||
173 | +#endif | |||
174 | int cr_len = sizeof (cr); | |||
175 | ||||
176 | if (getsockopt (client_fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) == 0 && | |||
177 | @@ -1238,8 +1288,21 @@ _dbus_read_credentials_socket (int | |||
178 | cr_len, (int) sizeof (cr), _dbus_strerror (errno)); | |||
179 | } | |||
180 | #elif defined(HAVE_CMSGCRED) | |||
181 | - pid_read = cmsg.cred.cmcred_pid; | |||
182 | - uid_read = cmsg.cred.cmcred_euid; | |||
183 | + struct cmsgcred *cred; | |||
184 | + | |||
185 | + cred = (struct cmsgcred *) CMSG_DATA (&cmsg); | |||
186 | + pid_read = cred->cmcred_pid; | |||
187 | + uid_read = cred->cmcred_euid; | |||
188 | +#elif defined(LOCAL_PEEREID) | 115 | +#elif defined(LOCAL_PEEREID) | |
189 | + if (dbus_nb_getpeereid(client_fd, &sockpid, &sockuid, &sockgid) == TRUE) | 116 | + if (dbus_nb_getpeereid(client_fd, &sockpid, &sockuid, &sockgid) == TRUE) | |
190 | + { | 117 | + { | |
191 | + pid_read = sockpid; | 118 | + pid_read = sockpid; | |
192 | + uid_read = sockuid; | 119 | + uid_read = sockuid; | |
193 | + } | 120 | + } | |
194 | + else | 121 | + else | |
195 | + { | 122 | + { | |
196 | + _dbus_verbose ("Failed to dbus_nb_getpeereid() credentials: %s\n", _dbus_strerror (errno)); | 123 | + _dbus_verbose ("Failed to dbus_nb_getpeereid() credentials: %s\n", _dbus_strerror (errno)); | |
197 | + } | 124 | + } | |
198 | #elif defined(LOCAL_CREDS) | 125 | #elif defined(LOCAL_CREDS) | |
199 | pid_read = DBUS_PID_UNSET; | 126 | pid_read = DBUS_PID_UNSET; | |
200 | uid_read = cmsg.cred.sc_uid; | 127 | uid_read = cmsg.cred.sc_uid; | |
201 | @@ -1301,7 +1364,7 @@ _dbus_read_credentials_socket (int | 128 | @@ -1848,7 +1904,7 @@ _dbus_read_credentials_socket (int | |
202 | } | 129 | } | |
203 | if (ucred != NULL) | 130 | if (ucred != NULL) | |
204 | ucred_free (ucred); | 131 | ucred_free (ucred); | |
205 | -#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED */ | 132 | -#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED */ | |
206 | +#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED && !LOCAL_PEEREID*/ | 133 | +#else /* !SO_PEERCRED && !HAVE_CMSGCRED && !HAVE_GETPEEREID && !HAVE_GETPEERUCRED && !LOCAL_PEEREID */ | |
207 | _dbus_verbose ("Socket credentials not supported on this OS\n"); | 134 | _dbus_verbose ("Socket credentials not supported on this OS\n"); | |
208 | #endif | 135 | #endif | |
209 | } | 136 | } | |
210 | @@ -1826,7 +1889,26 @@ _dbus_parse_uid (const DBusString * | |||
211 | return TRUE; | |||
212 | } | |||
213 | ||||
214 | +#ifdef HAVE_NETBSD_ATOMIC_OPS | |||
215 | +dbus_int32_t | |||
216 | +_dbus_atomic_inc (DBusAtomic *atomic) | |||
217 | +{ | |||
218 | + register dbus_int32_t old = atomic->value; | |||
219 | ||||
220 | + atomic_inc_uint((unsigned *)&atomic->value); | |||
221 | + return old; | |||
222 | +} | |||
223 | + | |||
224 | +dbus_int32_t | |||
225 | +_dbus_atomic_dec (DBusAtomic *atomic) | |||
226 | +{ | |||
227 | + register dbus_int32_t old = atomic->value; | |||
228 | + | |||
229 | + atomic_dec_uint((unsigned *)&atomic->value); | |||
230 | + return old; | |||
231 | +} | |||
232 | +_DBUS_DEFINE_GLOBAL_LOCK (atomic); | |||
233 | +#else | |||
234 | _DBUS_DEFINE_GLOBAL_LOCK (atomic); | |||
235 | ||||
236 | #if DBUS_USE_ATOMIC_INT_486_COND | |||
237 | @@ -1891,6 +1973,7 @@ _dbus_atomic_dec (DBusAtomic *atomic) | |||
238 | return res; | |||
239 | #endif | |||
240 | } | |||
241 | +#endif /* HAVE_NETBSD_ATOMIC_OPS */ | |||
242 | ||||
243 | #ifdef DBUS_BUILD_TESTS | |||
244 | /** Gets our GID | |||
245 | @@ -2792,8 +2875,18 @@ int | |||
246 | _dbus_printf_string_upper_bound (const char *format, | |||
247 | va_list args) | |||
248 | { | |||
249 | +#if defined(__hpux) || defined(__sgi) | |||
250 | +/* this code from libnbcompat's vsnprintf */ | |||
251 | + static FILE *devnull = 0; | |||
252 | + if (!devnull) { | |||
253 | + devnull = fopen("/dev/null", "w"); | |||
254 | + if (!devnull) return -1; | |||
255 | + } | |||
256 | + return vfprintf(devnull, format, args); | |||
257 | +#else | |||
258 | char c; | |||
259 | return vsnprintf (&c, 1, format, args); | |||
260 | +#endif | |||
261 | } | |||
262 | ||||
263 | /** |
@@ -1,13 +1,13 @@ | @@ -1,13 +1,13 @@ | |||
1 | $NetBSD: patch-ak,v 1.1 2008/09/24 11:37:31 taca Exp $ | 1 | $NetBSD: patch-ak,v 1.2 2012/08/01 17:52:22 drochner Exp $ | |
2 | 2 | |||
3 | --- dbus/Makefile.in.orig 2008-08-07 04:43:39.000000000 +0900 | 3 | --- dbus/Makefile.in.orig 2012-07-26 16:44:07.000000000 +0000 | |
4 | +++ dbus/Makefile.in | 4 | +++ dbus/Makefile.in | |
5 | @@ -310,7 +310,7 @@ top_builddir = @top_builddir@ | 5 | @@ -591,7 +591,7 @@ AM_CPPFLAGS = \ | |
6 | top_srcdir = @top_srcdir@ | 6 | $(SYSTEMD_CFLAGS) \ | |
7 | configdir = $(sysconfdir)/dbus-1 | 7 | $(VALGRIND_CFLAGS) \ | |
8 | INCLUDES = -I$(top_builddir) -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) @PIC_CFLAGS@ -DDBUS_COMPILATION \ | 8 | -DDBUS_COMPILATION \ | |
9 | - -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \ | 9 | - -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \ | |
10 | + -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \ | 10 | + -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \ | |
11 | -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ | 11 | -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ | |
12 | -DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\" | 12 | -DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\" \ | |
13 | 13 | $(NULL) |
@@ -1,24 +1,25 @@ | @@ -1,24 +1,25 @@ | |||
1 | $NetBSD: patch-al,v 1.1 2008/09/24 11:37:31 taca Exp $ | 1 | $NetBSD: patch-al,v 1.2 2012/08/01 17:52:22 drochner Exp $ | |
2 | 2 | |||
3 | --- tools/Makefile.in.orig 2008-08-07 04:43:39.000000000 +0900 | 3 | --- tools/Makefile.in.orig 2012-07-26 16:45:13.000000000 +0000 | |
4 | +++ tools/Makefile.in | 4 | +++ tools/Makefile.in | |
5 | @@ -301,7 +301,7 @@ target_vendor = @target_vendor@ | 5 | @@ -358,7 +358,7 @@ AM_CPPFLAGS = \ | |
6 | top_builddir = @top_builddir@ | 6 | $(DBUS_STATIC_BUILD_CPPFLAGS) \ | |
7 | top_srcdir = @top_srcdir@ | 7 | $(DBUS_X_CFLAGS) \ | |
8 | configdir = $(sysconfdir)/dbus-1 | 8 | -DDBUS_COMPILATION \ | |
9 | -INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" | 9 | - -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \ | |
10 | +INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" | 10 | + -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \ | |
11 | dbus_send_SOURCES = \ | 11 | $(NULL) | |
12 | dbus-print-message.c \ | |||
13 | dbus-print-message.h \ | |||
14 | @@ -337,8 +337,8 @@ CLEANFILES = \ | |||
15 | run-with-tmp-session-bus.conf | |||
16 | 12 | |||
17 | 13 | |||
18 | -#create the /var/lib/data directory for dbus-uuidgen | 14 | @@ -756,9 +756,9 @@ uninstall-am: uninstall-binPROGRAMS | |
19 | -localstatelibdir = $(localstatedir)/lib/dbus | 15 | uninstall-binPROGRAMS | |
20 | +#create the /var/db/dbus directory for dbus-uuidgen | |||
21 | +localstatelibdir = $(localstatedir)/db/dbus | |||
22 | localstatelib_DATA = | |||
23 | all: all-am | |||
24 | 16 | |||
17 | ||||
18 | -# create the /var/lib/dbus directory for dbus-uuidgen | |||
19 | +# create the /var/db/dbus directory for dbus-uuidgen | |||
20 | install-data-local: | |||
21 | - $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus | |||
22 | + $(MKDIR_P) $(DESTDIR)$(localstatedir)/db/dbus | |||
23 | ||||
24 | installcheck-local: | |||
25 | test -d $(DESTDIR)$(localstatedir)/lib/dbus |
$NetBSD: patch-ba,v 1.2 2012/08/01 17:52:22 drochner Exp $
--- tools/dbus-monitor.c.orig 2012-07-26 17:37:48.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"
#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
profile_print_with_attrs (const char *type, DBusMessage *message,
struct timeval *t, ProfileAttributeFlags attrs)
{
- printf (PROFILE_TIMED_FORMAT, type, t->tv_sec, t->tv_usec);
+ printf (PROFILE_TIMED_FORMAT, type, (unsigned long long)(t->tv_sec), (unsigned long)(t->tv_usec));
if (attrs & PROFILE_ATTRIBUTE_FLAG_SERIAL)
printf ("\t%u", dbus_message_get_serial (message));
@@ -197,7 +197,7 @@ print_message_profile (DBusMessage *mess
PROFILE_ATTRIBUTE_FLAG_MEMBER);
break;
default:
- printf (PROFILE_TIMED_FORMAT "\n", "tun", t.tv_sec, t.tv_usec);
+ printf (PROFILE_TIMED_FORMAT "\n", "tun", (unsigned long long)(t.tv_sec), (unsigned long)(t.tv_usec));
break;
}
}