[44452] trunk/dports/devel/dbus
gwhitney at macports.org
gwhitney at macports.org
Sun Dec 28 15:07:19 PST 2008
Revision: 44452
http://trac.macports.org/changeset/44452
Author: gwhitney at macports.org
Date: 2008-12-28 15:07:19 -0800 (Sun, 28 Dec 2008)
Log Message:
-----------
Update dbus to 1.2.10 and patch two bugs
Besides updating this port to 1.2.10, it also includes patches for
the following dbus bugs:
dbus bug 19307 http://bugs.freedesktop.org/show_bug.cgi?id=19307
bug 19309 http://bugs.freedesktop.org/show_bug.cgi?id=19309
Modified Paths:
--------------
trunk/dports/devel/dbus/Portfile
Added Paths:
-----------
trunk/dports/devel/dbus/files/patch-dbus-sysdeps-unix.c.diff
trunk/dports/devel/dbus/files/patch-dbus-sysdeps-util-unix.c.diff
Modified: trunk/dports/devel/dbus/Portfile
===================================================================
--- trunk/dports/devel/dbus/Portfile 2008-12-28 21:51:51 UTC (rev 44451)
+++ trunk/dports/devel/dbus/Portfile 2008-12-28 23:07:19 UTC (rev 44452)
@@ -4,7 +4,7 @@
PortSystem 1.0
name dbus
-version 1.2.6
+version 1.2.10
maintainers nomaintainer
categories devel
platforms darwin
@@ -16,11 +16,13 @@
homepage http://www.freedesktop.org/Software/dbus
master_sites http://dbus.freedesktop.org/releases/dbus
-checksums md5 5dedbe09d4d6a324518487c5277dfa50 \
- sha1 add5c16a0c70ad1b4184bdb9d2d99ee8f3532532 \
- rmd160 23e16238e48e39578439c823bc8476882f1a122d
+checksums md5 ae740e0792313c8bb6e2a92ee0b70616 \
+ sha1 63088b3443b5fea2df2550fd5827dd514dc31262 \
+ rmd160 c770266d4f7ee11011467c05f775935fe57c0549
-patchfiles patch-dbus-launch-x11.c.diff
+patchfiles patch-dbus-launch-x11.c.diff \
+ patch-dbus-sysdeps-unix.c.diff \
+ patch-dbus-sysdeps-util-unix.c.diff
depends_build port:pkgconfig
Added: trunk/dports/devel/dbus/files/patch-dbus-sysdeps-unix.c.diff
===================================================================
--- trunk/dports/devel/dbus/files/patch-dbus-sysdeps-unix.c.diff (rev 0)
+++ trunk/dports/devel/dbus/files/patch-dbus-sysdeps-unix.c.diff 2008-12-28 23:07:19 UTC (rev 44452)
@@ -0,0 +1,74 @@
+--- dbus/dbus-sysdeps-unix.c.orig 2008-12-28 12:03:48.000000000 -0500
++++ dbus/dbus-sysdeps-unix.c 2008-12-28 12:13:00.000000000 -0500
+@@ -1591,8 +1591,10 @@
+ gid_t *buf;
+ int buf_count;
+ int i;
+-
+- buf_count = 17;
++ int initial_buf_count;
++
++ initial_buf_count = 17;
++ buf_count = initial_buf_count;
+ buf = dbus_new (gid_t, buf_count);
+ if (buf == NULL)
+ {
+@@ -1604,7 +1606,29 @@
+ info->primary_gid,
+ buf, &buf_count) < 0)
+ {
+- gid_t *new = dbus_realloc (buf, buf_count * sizeof (buf[0]));
++ gid_t *new;
++ /* Presumed cause of negative return code: buf has insufficient
++ entries to hold the entire group list. The Linux behavior in this
++ case is to pass back the actual number of groups in buf_count, but
++ on Mac OS X 10.5, buf_count is unhelpfully left alone.
++ So as a hack, try to help out a bit by guessing a larger
++ number of groups, within reason.. might still fail, of course,
++ but we can at least print a more informative message. I looked up
++ the "right way" to do this by downloading Apple's own source code
++ for the "id" command, and it turns out that they use an
++ undocumented library function getgrouplist_2 (!) which is not
++ declared in any header in /usr/include (!!). That did not seem
++ like the way to go here.
++
++ I also demoted this problem to a warning as long as errno is 0,
++ since as far as I could tell from discussion on the web, dbus works
++ fine even when HAVE_GETGROUPLIST is false and it can only know about
++ the primary group.
++ */
++ if (buf_count == initial_buf_count) {
++ buf_count *= 16; /* Retry with an arbitrarily scaled-up array */
++ }
++ new = dbus_realloc (buf, buf_count * sizeof (buf[0]));
+ if (new == NULL)
+ {
+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+@@ -1617,14 +1641,19 @@
+ errno = 0;
+ if (getgrouplist (username_c, info->primary_gid, buf, &buf_count) < 0)
+ {
+- dbus_set_error (error,
+- _dbus_error_from_errno (errno),
+- "Failed to get groups for username \"%s\" primary GID "
+- DBUS_GID_FORMAT ": %s\n",
+- username_c, info->primary_gid,
+- _dbus_strerror (errno));
+- dbus_free (buf);
+- goto failed;
++ if (errno == 0) {
++ _dbus_warn("It appears that username \"%s\" is in more than %d groups.\nProceeding with just the first %d groups.",
++ username_c, buf_count, buf_count);
++ } else {
++ dbus_set_error (error,
++ _dbus_error_from_errno (errno),
++ "Failed to get groups for username \"%s\" primary GID "
++ DBUS_GID_FORMAT ": %s\n",
++ username_c, info->primary_gid,
++ _dbus_strerror (errno));
++ dbus_free (buf);
++ goto failed;
++ }
+ }
+ }
+
Added: trunk/dports/devel/dbus/files/patch-dbus-sysdeps-util-unix.c.diff
===================================================================
--- trunk/dports/devel/dbus/files/patch-dbus-sysdeps-util-unix.c.diff (rev 0)
+++ trunk/dports/devel/dbus/files/patch-dbus-sysdeps-util-unix.c.diff 2008-12-28 23:07:19 UTC (rev 44452)
@@ -0,0 +1,17 @@
+--- dbus/dbus-sysdeps-util-unix.c.orig 2008-12-28 12:04:09.000000000 -0500
++++ dbus/dbus-sysdeps-util-unix.c 2008-12-28 10:04:16.000000000 -0500
+@@ -43,6 +43,7 @@
+ #include <sys/socket.h>
+ #include <dirent.h>
+ #include <sys/un.h>
++#include <syslog.h>
+ #ifdef HAVE_LIBAUDIT
+ #include <sys/prctl.h>
+ #include <sys/capability.h>
+@@ -1227,4 +1228,4 @@
+ _dbus_string_free (&cmdline);
+ _dbus_string_free (&path);
+ return FALSE;
+-}
+\ No newline at end of file
++}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081228/ddd9aa03/attachment.html>
More information about the macports-changes
mailing list