SOURCES: dbus-kill-babysitter.patch (NEW), dbus-python-threadsync....

freetz freetz at pld-linux.org
Sat Jul 2 22:54:00 CEST 2005


Author: freetz                       Date: Sat Jul  2 20:54:00 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- post release fixups

---- Files affected:
SOURCES:
   dbus-kill-babysitter.patch (NONE -> 1.1)  (NEW), dbus-python-threadsync.patch (NONE -> 1.1)  (NEW), hal-dont-mount-sync.patch (NONE -> 1.1)  (NEW), hal-fix-doublefree.patch (NONE -> 1.1)  (NEW), hal-fixup-fstab-sync-man-page.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/dbus-kill-babysitter.patch
diff -u /dev/null SOURCES/dbus-kill-babysitter.patch:1.1
--- /dev/null	Sat Jul  2 22:54:00 2005
+++ SOURCES/dbus-kill-babysitter.patch	Sat Jul  2 22:53:55 2005
@@ -0,0 +1,62 @@
+Index: dbus/dbus-spawn.c
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-spawn.c,v
+retrieving revision 1.20
+diff -u -p -r1.20 dbus-spawn.c
+--- dbus/dbus-spawn.c	10 Nov 2004 20:12:15 -0000	1.20
++++ dbus/dbus-spawn.c	28 Jun 2005 15:08:59 -0000
+@@ -252,6 +252,9 @@ _dbus_babysitter_ref (DBusBabysitter *si
+ 
+ /**
+  * Decrement the reference count on the babysitter object.
++ * When the reference count of the babysitter object reaches
++ * zero, the babysitter is killed and the child that was being
++ * babysat gets emancipated.
+  *
+  * @param sitter the babysitter
+  */
+@@ -266,6 +269,13 @@ _dbus_babysitter_unref (DBusBabysitter *
+     {      
+       if (sitter->socket_to_babysitter >= 0)
+         {
++          /* If we haven't forked other babysitters
++           * since this babysitter and socket were
++           * created then this close will cause the
++           * babysitter to wake up from poll with
++           * a hangup and then the babysitter will
++           * quit itself.
++           */
+           close (sitter->socket_to_babysitter);
+           sitter->socket_to_babysitter = -1;
+         }
+@@ -276,14 +286,27 @@ _dbus_babysitter_unref (DBusBabysitter *
+           sitter->error_pipe_from_child = -1;
+         }
+ 
+-      if (sitter->sitter_pid != -1)
++      if (sitter->sitter_pid > 0)
+         {
+           int status;
+           int ret;
+ 
+-          /* Reap the babysitter */
++          /* It's possible the babysitter died on its own above 
++           * from the close, or was killed randomly
++           * by some other process, so first try to reap it
++           */
++          ret = waitpid (sitter->sitter_pid, &status, WNOHANG);
++
++          /* If we couldn't reap the child then kill it, and
++           * try again
++           */
++          if (ret == 0)
++            kill (sitter->sitter_pid, SIGKILL);
++
+         again:
+-          ret = waitpid (sitter->sitter_pid, &status, 0);
++          if (ret == 0)
++            ret = waitpid (sitter->sitter_pid, &status, 0);
++
+           if (ret < 0)
+             {
+               if (errno == EINTR)

================================================================
Index: SOURCES/dbus-python-threadsync.patch
diff -u /dev/null SOURCES/dbus-python-threadsync.patch:1.1
--- /dev/null	Sat Jul  2 22:54:00 2005
+++ SOURCES/dbus-python-threadsync.patch	Sat Jul  2 22:53:55 2005
@@ -0,0 +1,84 @@
+--- dbus/python/dbus_bindings.pyx.in.orig	2005-06-16 01:51:46.000000000 -0400
++++ dbus/python/dbus_bindings.pyx.in	2005-06-28 15:23:44.000000000 -0400
+@@ -34,6 +34,10 @@
+     void Py_XINCREF (object)
+     void Py_XDECREF (object)
+     object PyString_FromStringAndSize(char *, int)
++    ctypedef void *PyGILState_STATE
++    void PyErr_Clear()
++    PyGILState_STATE PyGILState_Ensure()
++    void PyGILState_Release(PyGILState_STATE)
+ 
+ ctypedef struct DBusError:
+     char *name
+@@ -158,38 +162,46 @@
+ cdef void cunregister_function_handler (DBusConnection *connection,
+                                         void *user_data):
+     cdef Connection conn
+-    tup = <object>user_data
+-    assert (type(tup) == list)    
+-    function = tup[1]
+-    conn = Connection()
+-    conn.__cinit__(None, connection)
++    cdef PyGILState_STATE gil
+ 
+-    args = [conn]
+-    function(*args)
++    gil = PyGILState_Ensure()
++    try:
++        itup = <object>user_data
++        assert (type(tup) == list)    
++        function = tup[1]
++        conn = Connection()
++        conn.__cinit__(None, connection)
++
++        args = [conn]
++        function(*args)
++    finally:
++        PyGILState_Release(gil)
+ 
+ cdef DBusHandlerResult cmessage_function_handler (DBusConnection *connection,
+                                                   DBusMessage *msg,
+                                                   void *user_data):
+     cdef Connection conn
+     cdef Message message
++    cdef PyGILState_STATE gil
+ 
+-    tup = <object>user_data
+-    assert (type(tup) == list)
+-    function = tup[0]
+-    message = Message(_create=0)
+-    message._set_msg(msg)
+-  
+-    conn = Connection()
+-    conn.__cinit__(None, connection)  
+- 
+-    args = [conn,
+-            message]
+-    retval = function(*args)
+-    if (retval == None):
+-        retval = DBUS_HANDLER_RESULT_HANDLED
+-
+-    return retval
+-
++    gil = PyGILState_Ensure()
++    try:
++        tup = <object>user_data
++        assert (type(tup) == list)
++        function = tup[0]
++        message = Message(_create=0)
++        message._set_msg(msg)
++        conn = Connection()
++        conn.__cinit__(None, connection)  
++        args = [conn,
++                message]
++        retval = function(*args)
++        if (retval == None):
++            retval = DBUS_HANDLER_RESULT_HANDLED
++        return retval
++    finally:
++        PyGILState_Release(gil)
++	
+ cdef class Connection:
+     cdef DBusConnection *conn
+     

================================================================
Index: SOURCES/hal-dont-mount-sync.patch
diff -u /dev/null SOURCES/hal-dont-mount-sync.patch:1.1
--- /dev/null	Sat Jul  2 22:54:00 2005
+++ SOURCES/hal-dont-mount-sync.patch	Sat Jul  2 22:53:55 2005
@@ -0,0 +1,22 @@
+--- fdi/policy/10osvendor/10-storage-policy.fdi.orig	2005-05-13 14:41:02.000000000 -0400
++++ fdi/policy/10osvendor/10-storage-policy.fdi	2005-05-13 14:41:20.000000000 -0400
+@@ -131,19 +131,6 @@
+ 	    </match>
+ 	  </match>
+ 	  
+-	  <!-- Use noatime and sync options for all hotpluggable or removable
+-	       volumes smaller than 2GB -->
+-	  <match key="volume.size" compare_lt="2147483648">
+-	    <match key="@block.storage_device:storage.hotpluggable" bool="true">
+-	      <merge key="volume.policy.mount_option.sync" type="bool">true</merge>
+-	      <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
+-	    </match>
+-	    <match key="@block.storage_device:storage.removable" bool="true">
+-	      <merge key="volume.policy.mount_option.sync" type="bool">true</merge>
+-	      <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
+-	    </match>
+-	  </match>
+-	  
+ 	  <!-- Attempt mount point 'ipod' for iPod's -->
+ 	  <match key="@block.storage_device:portable_audio_player.type" string="ipod">
+ 	    <merge key="volume.policy.desired_mount_point" type="string">ipod</merge>

================================================================
Index: SOURCES/hal-fix-doublefree.patch
diff -u /dev/null SOURCES/hal-fix-doublefree.patch:1.1
--- /dev/null	Sat Jul  2 22:54:00 2005
+++ SOURCES/hal-fix-doublefree.patch	Sat Jul  2 22:53:55 2005
@@ -0,0 +1,16 @@
+Index: hald/hald_dbus.c
+===================================================================
+RCS file: /cvs/hal/hal/hald/hald_dbus.c,v
+retrieving revision 1.35
+diff -u -r1.35 hald_dbus.c
+--- hald/hald_dbus.c	27 Apr 2005 18:53:39 -0000	1.35
++++ hald/hald_dbus.c	23 May 2005 13:54:29 -0000
+@@ -1687,8 +1687,6 @@
+ 	g_hash_table_insert (services_with_locks, g_strdup (sender),
+ 			     g_object_ref (d));
+ 
+-	dbus_free (reason);
+-
+ 	if (!dbus_connection_send (connection, reply, NULL))
+ 		DIE (("No memory"));
+ 

================================================================
Index: SOURCES/hal-fixup-fstab-sync-man-page.patch
diff -u /dev/null SOURCES/hal-fixup-fstab-sync-man-page.patch:1.1
--- /dev/null	Sat Jul  2 22:54:00 2005
+++ SOURCES/hal-fixup-fstab-sync-man-page.patch	Sat Jul  2 22:53:55 2005
@@ -0,0 +1,68 @@
+Index: tools/fstab-sync.8.in
+===================================================================
+RCS file: /cvs/hal/hal/tools/fstab-sync.8.in,v
+retrieving revision 1.2
+diff -u -r1.2 fstab-sync.8.in
+--- tools/fstab-sync.8.in	19 Oct 2004 00:42:29 -0000	1.2
++++ tools/fstab-sync.8.in	23 May 2005 13:55:04 -0000
+@@ -20,9 +20,7 @@
+ and create/remove mount points in
+ .B /media
+ in response to HAL events. This program is usually never run directly
+-from a shell; instead it is invoked as a callout from the
+-.B @SYSCONFDIR@/hal/device.d
+-directory by the HAL daemon.
++from a shell; instead it is invoked as a callout by the HAL daemon.
+ 
+ .PP
+ Additionally, this program offers an option of removing any trace of
+@@ -84,27 +82,13 @@
+ 
+ .PP
+ By default, the 
+-.B @DATADIR@/hal/fdi/90defaultpolicy/storage-policy.fdi
++.B @DATADIR@/hal/fdi/policy/10osvendor/10-storage-policy.fdi
+ file specifies the policy - this file should never be edited by the
+ system administrator as it might get updated by the OS vendor for security
+ updates. Instead, system- or site-specific rules can be put in
+ the
+-.B @DATADIR@/hal/fdi/95userpolicy
+-directory.
+-
+-Device information files are processed for every hal device object in the
+-.B @DATADIR@/hal/fdi/ 
+-directory in alphabetical order including directories. Hence, files in the
+-.B 90defaultpolicy
+-directory are processed before files
+-.B 95userpolicy
+-directory, 
+-.B 95userpolicy/a.fdi 
+-is processed before
+-.B 95userpolicy/b.fdi 
+-and so on. In addition, directives in specific files are processed in a
+-top-down fashion.
+-
++.B @SYSCONFDIR@/hal/fdi/policy/
++directory as separate files.
+ 
+ .PP
+ A number of sample policy files for various uses should
+@@ -125,13 +109,11 @@
+ .B /etc/fstab
+ file by the
+ .B fstab-sync
+-program from the HAL daemon can be disabled by changing the
+-.B 50-fstab-sync.hal
+-symlink in
+-.B @SYSCONFDIR@/hal/device.d
+-directory to point to
+-.B /bin/false
+-.
++program from the HAL daemon can be disabled by making the 
++.B /etc/fstab
++file immutable (using
++.B chattr +i /etc/fstab
++for example)
+ 
+ .SH OPTIONS
+ The following options are supported:
================================================================



More information about the pld-cvs-commit mailing list