diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2005-07-16 15:47:02 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2005-07-16 15:47:02 +0000 |
commit | f7b57fccb2d732f5ed24c4c0516c8a0a2104d65a (patch) | |
tree | b1db9ad53762601c64e9c3a01eab1fdecaf7c3a0 /devel/dbus | |
parent | a5b722983e3692ae4a9c946d001e672444d170da (diff) | |
download | ports-f7b57fccb2d732f5ed24c4c0516c8a0a2104d65a.tar.gz ports-f7b57fccb2d732f5ed24c4c0516c8a0a2104d65a.zip |
- Fix a patch which did not apply [1]
- Fix build on 4.x
- Also create ${PREFIX}/etc/dbus-1/system.d when installed from a package
Reported by: Dennis Cabooter [1]
Notes
Notes:
svn path=/head/; revision=139357
Diffstat (limited to 'devel/dbus')
-rw-r--r-- | devel/dbus/Makefile | 2 | ||||
-rw-r--r-- | devel/dbus/files/patch-dbus_dbus-sysdeps.c | 108 | ||||
-rw-r--r-- | devel/dbus/files/patch-glib_dbus-gvalue-utils.c | 25 | ||||
-rw-r--r-- | devel/dbus/files/patch-tools_dbus-send.c | 18 | ||||
-rw-r--r-- | devel/dbus/pkg-plist | 1 |
5 files changed, 38 insertions, 116 deletions
diff --git a/devel/dbus/Makefile b/devel/dbus/Makefile index be7c6bc73b76..632260e62e36 100644 --- a/devel/dbus/Makefile +++ b/devel/dbus/Makefile @@ -7,7 +7,7 @@ PORTNAME= dbus PORTVERSION= 0.35 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= devel gnome MASTER_SITES= http://dbus.freedesktop.org/releases/ diff --git a/devel/dbus/files/patch-dbus_dbus-sysdeps.c b/devel/dbus/files/patch-dbus_dbus-sysdeps.c index c8e0d0654896..87b667d46573 100644 --- a/devel/dbus/files/patch-dbus_dbus-sysdeps.c +++ b/devel/dbus/files/patch-dbus_dbus-sysdeps.c @@ -101,111 +101,3 @@ #else /* !SO_PEERCRED && !HAVE_CMSGCRED */ _dbus_verbose ("Socket credentials not supported on this OS\n"); #endif ---- dbus/dbus-sysdeps.c.orig Sat Mar 5 13:38:54 2005 -+++ dbus/dbus-sysdeps.c Tue Apr 26 01:59:05 2005 -@@ -742,12 +742,40 @@ write_credentials_byte (int - { - int bytes_written; - char buf[1] = { '\0' }; -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) -+ struct { -+ struct cmsghdr hdr; -+ struct cmsgcred cred; -+ } cmsg; -+ struct iovec iov; -+ struct msghdr msg; -+#endif -+ -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) -+ iov.iov_base = buf; -+ iov.iov_len = 1; -+ -+ memset (&msg, 0, sizeof (msg)); -+ msg.msg_iov = &iov; -+ msg.msg_iovlen = 1; -+ -+ msg.msg_control = &cmsg; -+ msg.msg_controllen = sizeof (cmsg); -+ memset (&cmsg, 0, sizeof (cmsg)); -+ cmsg.hdr.cmsg_len = sizeof (cmsg); -+ cmsg.hdr.cmsg_level = SOL_SOCKET; -+ cmsg.hdr.cmsg_type = SCM_CREDS; -+#endif - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - again: - -+#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) -+ bytes_written = sendmsg (server_fd, &msg, 0); -+#else - bytes_written = write (server_fd, buf, 1); -+#endif - - if (bytes_written < 0 && errno == EINTR) - goto again; -@@ -801,8 +829,10 @@ _dbus_read_credentials_unix_socket (int - char buf; - - #ifdef HAVE_CMSGCRED -- char cmsgmem[CMSG_SPACE (sizeof (struct cmsgcred))]; -- struct cmsghdr *cmsg = (struct cmsghdr *) cmsgmem; -+ struct { -+ struct cmsghdr hdr; -+ struct cmsgcred cred; -+ } cmsg; - #endif - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); -@@ -817,7 +847,7 @@ _dbus_read_credentials_unix_socket (int - - _dbus_credentials_clear (credentials); - --#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) -+#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__) - /* Set the socket to receive credentials on the next message */ - { - int on = 1; -@@ -837,9 +867,9 @@ _dbus_read_credentials_unix_socket (int - msg.msg_iovlen = 1; - - #ifdef HAVE_CMSGCRED -- memset (cmsgmem, 0, sizeof (cmsgmem)); -- msg.msg_control = cmsgmem; -- msg.msg_controllen = sizeof (cmsgmem); -+ memset (&cmsg, 0, sizeof (cmsg)); -+ msg.msg_control = &cmsg; -+ msg.msg_controllen = sizeof (cmsg); - #endif - - again: -@@ -862,9 +892,10 @@ _dbus_read_credentials_unix_socket (int - } - - #ifdef HAVE_CMSGCRED -- if (cmsg->cmsg_len < sizeof (cmsgmem) || cmsg->cmsg_type != SCM_CREDS) -+ if (cmsg.hdr.cmsg_len < sizeof (cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) - { -- dbus_set_error (error, DBUS_ERROR_FAILED); -+ dbus_set_error (error, DBUS_ERROR_FAILED, -+ "Did not receive credentials"); - _dbus_verbose ("Message from recvmsg() was not SCM_CREDS\n"); - return FALSE; - } -@@ -890,13 +921,9 @@ _dbus_read_credentials_unix_socket (int - cr_len, (int) sizeof (cr), _dbus_strerror (errno)); - } - #elif defined(HAVE_CMSGCRED) -- struct cmsgcred *cred; -- -- cred = (struct cmsgcred *) CMSG_DATA (cmsg); -- -- credentials->pid = cred->cmcred_pid; -- credentials->uid = cred->cmcred_euid; -- credentials->gid = cred->cmcred_groups[0]; -+ credentials->pid = cmsg.cred.cmcred_pid; -+ credentials->uid = cmsg.cred.cmcred_euid; -+ credentials->gid = cmsg.cred.cmcred_groups[0]; - #else /* !SO_PEERCRED && !HAVE_CMSGCRED */ - _dbus_verbose ("Socket credentials not supported on this OS\n"); - #endif diff --git a/devel/dbus/files/patch-glib_dbus-gvalue-utils.c b/devel/dbus/files/patch-glib_dbus-gvalue-utils.c index 9067bf37c2bc..b8a14967865b 100644 --- a/devel/dbus/files/patch-glib_dbus-gvalue-utils.c +++ b/devel/dbus/files/patch-glib_dbus-gvalue-utils.c @@ -1,6 +1,6 @@ ---- glib/dbus-gvalue-utils.c.orig Sat Jul 2 01:10:40 2005 -+++ glib/dbus-gvalue-utils.c Sat Jul 2 01:11:18 2005 -@@ -682,7 +682,6 @@ dbus_g_type_specialized_builtins_init (v +--- glib/dbus-gvalue-utils.c.orig Mon Jul 11 00:54:18 2005 ++++ glib/dbus-gvalue-utils.c Sat Jul 16 17:27:30 2005 +@@ -855,7 +855,6 @@ NULL }; @@ -8,19 +8,30 @@ static const DBusGTypeSpecializedCollectionVtable ptrarray_vtable = { { -@@ -697,7 +696,6 @@ dbus_g_type_specialized_builtins_init (v - ptrarray_iterator +@@ -869,7 +868,6 @@ + NULL, }; - dbus_g_type_register_collection ("GPtrArray", &ptrarray_vtable, 0); + static const DBusGTypeSpecializedCollectionVtable slist_vtable = { + { +@@ -883,8 +881,6 @@ + slist_end_append, + }; + +- dbus_g_type_register_collection ("GSList", &slist_vtable, 0); +- static const DBusGTypeSpecializedMapVtable hashtable_vtable = { { -@@ -711,5 +709,7 @@ dbus_g_type_specialized_builtins_init (v - hashtable_iterator + hashtable_constructor, +@@ -898,6 +894,9 @@ + hashtable_append }; ++ dbus_g_type_register_collection ("GSList", &slist_vtable, 0); + dbus_g_type_register_collection ("GArray", &array_vtable, 0); + dbus_g_type_register_collection ("GPtrArray", &ptrarray_vtable, 0); dbus_g_type_register_map ("GHashTable", &hashtable_vtable, 0); } + diff --git a/devel/dbus/files/patch-tools_dbus-send.c b/devel/dbus/files/patch-tools_dbus-send.c new file mode 100644 index 000000000000..e0d86da0dede --- /dev/null +++ b/devel/dbus/files/patch-tools_dbus-send.c @@ -0,0 +1,18 @@ +--- tools/dbus-send.c.orig Sat Jul 16 17:31:11 2005 ++++ tools/dbus-send.c Sat Jul 16 17:31:30 2005 +@@ -401,6 +401,7 @@ + + if (container_type == DBUS_TYPE_DICT_ENTRY) + { ++ char sig[5]; + arg = c; + c = strchr (c, ':'); + if (c == NULL) +@@ -410,7 +411,6 @@ + } + *(c++) = 0; + secondary_type = type_from_name (arg); +- char sig[5]; + sig[0] = DBUS_DICT_ENTRY_BEGIN_CHAR; + sig[1] = type; + sig[2] = secondary_type; diff --git a/devel/dbus/pkg-plist b/devel/dbus/pkg-plist index 9ee90cf7ab0f..fb1e7e23a440 100644 --- a/devel/dbus/pkg-plist +++ b/devel/dbus/pkg-plist @@ -42,6 +42,7 @@ lib/libdbus-glib-1.so.1 %%QT%%lib/libdbus-qt-1.so.1 libdata/pkgconfig/dbus-1.pc libdata/pkgconfig/dbus-glib-1.pc +@exec mkdir -p %D/etc/dbus-1/system.d @exec mkdir -p %D/share/dbus-1/services @exec mkdir -p %%X11BASE%%/share/dbus-1/services @unexec rmdir %D/share/dbus-1/services 2>/dev/null || true |