Hello community,
here is the log from the commit of package hal
checked in at Mon Nov 17 17:57:11 CET 2008.
--------
--- hal/hal.changes 2008-11-14 17:33:05.000000000 +0100
+++ /mounts/work_src_done/STABLE/hal/hal.changes 2008-11-17 17:12:21.000000000 +0100
@@ -1,0 +2,19 @@
+Sat Nov 15 15:11:49 CET 2008 - dkukawka@suse.de
+
+- removed patch:
+ - hal-20080828-add-standby-support_v3.diff: fixed bnc#440926,
+ remove support for standby (S1)
+
+-------------------------------------------------------------------
+Sat Nov 15 14:57:48 CET 2008 - dukawka@suse.de
+
+- updated HAL to latest git (79b92dbdf65b8c) of my tree:
+- this update include fixes for:
+ - updated/fixed spec for memstick/memstick_host
+ - fixed problems with detect/handle when hald finished
+ initialisation
+ - fixed bnc#444913: since udev tell nothing about CD/DVD media
+ we still have to check the fs info via libvolume_id, use this
+ way only if there are no udev info
+
+-------------------------------------------------------------------
@@ -6,0 +26,2 @@
+ - removed python-devel from build requires since there is no
+ python stuff in the code anymore
hal-doc.changes: same change
calling whatdependson for head-i586
Old:
----
hal-20080828-add-standby-support_v3.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hal-doc.spec ++++++
--- /var/tmp/diff_new_pack.b12739/_old 2008-11-17 17:56:20.000000000 +0100
+++ /var/tmp/diff_new_pack.b12739/_new 2008-11-17 17:56:20.000000000 +0100
@@ -29,7 +29,7 @@
%define hal_info_version 20081107
%define libsmbios_version 2.0.2
Version: 0.5.12
-Release: 6
+Release: 7
Url: http://freedesktop.org/Software/hal
License: Other uncritical OpenSource License
Group: System/Daemons
@@ -79,7 +79,7 @@
Patch1: hal-20070613-panasonic-acpi-suse.diff
Patch2: hal-20061124-allow_uid_for_ntfs.diff
# SUSE specific temporary patches
-Patch10: hal-20080828-add-standby-support_v3.diff
+#Patch10:
# submitted (or planed to do in next time) upstream patches
Patch100: hal-20081112-fix-docking-support.diff
# backports from git master:
@@ -168,7 +168,7 @@
# patch hal package if needed
%patch1 -p0
%patch2 -p1
-%patch10 -p0
+#%patch10 -p0
%patch100 -p1
#%patch200 -p1
#%patch300 -p1
@@ -364,10 +364,25 @@
%endif
%changelog
+* Sat Nov 15 2008 dkukawka@suse.de
+- removed patch:
+ - hal-20080828-add-standby-support_v3.diff: fixed bnc#440926,
+ remove support for standby (S1)
+* Sat Nov 15 2008 dukawka@suse.de
+- updated HAL to latest git (79b92dbdf65b8c) of my tree:
+- this update include fixes for:
+ - updated/fixed spec for memstick/memstick_host
+ - fixed problems with detect/handle when hald finished
+ initialisation
+ - fixed bnc#444913: since udev tell nothing about CD/DVD media
+ we still have to check the fs info via libvolume_id, use this
+ way only if there are no udev info
* Fri Nov 14 2008 dkukawka@suse.de
- fixed bug:
- bnc#445018: removed consolekit from startscript since it's no
service anymore
+ - removed python-devel from build requires since there is no
+ python stuff in the code anymore
* Wed Nov 12 2008 dkukawka@suse.de
- updated patch:
- hal-20081112-fix-docking-support.diff: fixed segfault from
++++++ hal.spec ++++++
--- /var/tmp/diff_new_pack.b12739/_old 2008-11-17 17:56:20.000000000 +0100
+++ /var/tmp/diff_new_pack.b12739/_new 2008-11-17 17:56:20.000000000 +0100
@@ -29,7 +29,7 @@
%define hal_info_version 20081107
%define libsmbios_version 2.0.2
Version: 0.5.12
-Release: 6
+Release: 7
Url: http://freedesktop.org/Software/hal
License: GPL v2 or later; AFL
Group: System/Daemons
@@ -79,7 +79,7 @@
Patch1: hal-20070613-panasonic-acpi-suse.diff
Patch2: hal-20061124-allow_uid_for_ntfs.diff
# SUSE specific temporary patches
-Patch10: hal-20080828-add-standby-support_v3.diff
+#Patch10:
# submitted (or planed to do in next time) upstream patches
Patch100: hal-20081112-fix-docking-support.diff
# backports from git master:
@@ -167,7 +167,7 @@
# patch hal package if needed
%patch1 -p0
%patch2 -p1
-%patch10 -p0
+#%patch10 -p0
%patch100 -p1
#%patch200 -p1
#%patch300 -p1
@@ -363,10 +363,25 @@
%endif
%changelog
+* Sat Nov 15 2008 dkukawka@suse.de
+- removed patch:
+ - hal-20080828-add-standby-support_v3.diff: fixed bnc#440926,
+ remove support for standby (S1)
+* Sat Nov 15 2008 dukawka@suse.de
+- updated HAL to latest git (79b92dbdf65b8c) of my tree:
+- this update include fixes for:
+ - updated/fixed spec for memstick/memstick_host
+ - fixed problems with detect/handle when hald finished
+ initialisation
+ - fixed bnc#444913: since udev tell nothing about CD/DVD media
+ we still have to check the fs info via libvolume_id, use this
+ way only if there are no udev info
* Fri Nov 14 2008 dkukawka@suse.de
- fixed bug:
- bnc#445018: removed consolekit from startscript since it's no
service anymore
+ - removed python-devel from build requires since there is no
+ python stuff in the code anymore
* Wed Nov 12 2008 dkukawka@suse.de
- updated patch:
- hal-20081112-fix-docking-support.diff: fixed segfault from
++++++ hal-0.5.12.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hal-0.5.12/ChangeLog new/hal-0.5.12/ChangeLog
--- old/hal-0.5.12/ChangeLog 2008-11-07 16:50:20.000000000 +0100
+++ new/hal-0.5.12/ChangeLog 2008-11-15 14:55:37.000000000 +0100
@@ -1,3 +1,60 @@
+commit 79b92dbdf65b8c978d5a8f6fb2b421aac83c3de3
+Author: Danny Kukawka
+Date: Sat Nov 15 14:18:17 2008 +0100
+
+ improve HAL performance for filesystem detection
+
+ Improved HAL performance for filesystem detection. Call libvolume_id
+ functions in the volume prober to get the following information only
+ if we have no udev information about the filesystem:
+ - volume.fsusage
+ - volume.fstype
+ - volume.fsversion
+ - volume.uuid
+ - volume.label
+
+ HAL now simply use the already in the HotplugEvent stored information
+ from udev if available, since udev already called libvolume_id to get
+ these info. With this change HAL needs to probe only CD/DVD media and
+ maybe fakevolume related volumes.
+
+ hald/linux/blockdev.c | 56
+ +++++++++++++++++++++++++++++++++++--
+ hald/linux/probing/probe-volume.c | 10 ++++++
+ 2 files changed, 63 insertions(+), 3 deletions(-)
+
+commit 35c4e22c066151a3099da748209ca5152ccf9b51
+Author: Danny Kukawka
+Date: Sat Nov 15 12:57:38 2008 +0100
+
+ Revert "cleanup handling volume filesystem information"
+
+ This reverts commit 7aca1f3fefefd3c760636aabcff1e25946ab6391.
+
+ Reverted the change to prevent trouble with CD/DVD media (because
+ they are fakevolumes and udev tell us no information about the
+ filesystem on insert the media).
+
+ hald/linux/blockdev.c | 56 +-----------
+ hald/linux/probing/Makefile.am | 2 +-
+ hald/linux/probing/probe-volume.c | 181
+ ++++++++++++++++++++++++++++++++++++-
+ 3 files changed, 182 insertions(+), 57 deletions(-)
+
+commit 9797bc78bd16640df362709d982446c34653ea09
+Author: Danny Kukawka
+Date: Mon Nov 10 12:31:18 2008 +0100
+
+ fixed call of hotplug_queue_now_empty() under linux
+
+ Fixed call of hotplug_queue_now_empty() under linux. Call the
+ function first if the hotplug queue is really empty and if there
+ is no hotplug event in progress. Otherwise you get DeviceAdded
+ events while HAL is still initialising on startup.
+
+ hald/linux/hotplug.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
commit 2f9ad11a8835ae10e235a7d9d0374b40385d3533
Author: Danny Kukawka
Date: Fri Nov 7 16:31:09 2008 +0100
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hal-0.5.12/hald/linux/hotplug.c new/hal-0.5.12/hald/linux/hotplug.c
--- old/hal-0.5.12/hald/linux/hotplug.c 2008-11-07 15:20:43.000000000 +0100
+++ new/hal-0.5.12/hald/linux/hotplug.c 2008-11-15 14:23:04.000000000 +0100
@@ -454,8 +454,10 @@
processing = FALSE;
- hotplug_queue_now_empty ();
-
+ if (hotplug_event_queue->length == 0 && g_list_length (hotplug_events_in_progress) == 0) {
+ HAL_DEBUG(("Hotplug-queue empty now ... no hotplug events in progress"));
+ hotplug_queue_now_empty ();
+ }
}
gboolean
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hal-0.5.12/hald/linux/probing/Makefile.am new/hal-0.5.12/hald/linux/probing/Makefile.am
--- old/hal-0.5.12/hald/linux/probing/Makefile.am 2008-11-07 15:20:43.000000000 +0100
+++ new/hal-0.5.12/hald/linux/probing/Makefile.am 2008-11-15 14:23:04.000000000 +0100
@@ -45,7 +45,7 @@
hald_probe_pc_floppy_SOURCES = probe-pc-floppy.c ../../logger.c
hald_probe_volume_SOURCES = probe-volume.c linux_dvd_rw_utils.c ../../logger.c
-hald_probe_volume_LDADD = $(top_builddir)/libhal/libhal.la $(top_builddir)/partutil/libpartutil.la @GLIB_LIBS@
+hald_probe_volume_LDADD = $(top_builddir)/libhal/libhal.la $(top_builddir)/partutil/libpartutil.la @GLIB_LIBS@ @VOLUME_ID_LIBS@
hald_probe_ieee1394_unit_SOURCES = probe-ieee1394-unit.c ../../logger.c
hald_probe_ieee1394_unit_LDADD = $(top_builddir)/libhal/libhal.la
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hal-0.5.12/hald/linux/probing/Makefile.in new/hal-0.5.12/hald/linux/probing/Makefile.in
--- old/hal-0.5.12/hald/linux/probing/Makefile.in 2008-11-07 16:32:48.000000000 +0100
+++ new/hal-0.5.12/hald/linux/probing/Makefile.in 2008-11-15 14:23:47.000000000 +0100
@@ -309,7 +309,7 @@
hald_probe_storage_LDADD = @GLIB_LIBS@ @VOLUME_ID_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/partutil/libpartutil.la
hald_probe_pc_floppy_SOURCES = probe-pc-floppy.c ../../logger.c
hald_probe_volume_SOURCES = probe-volume.c linux_dvd_rw_utils.c ../../logger.c
-hald_probe_volume_LDADD = $(top_builddir)/libhal/libhal.la $(top_builddir)/partutil/libpartutil.la @GLIB_LIBS@
+hald_probe_volume_LDADD = $(top_builddir)/libhal/libhal.la $(top_builddir)/partutil/libpartutil.la @GLIB_LIBS@ @VOLUME_ID_LIBS@
hald_probe_ieee1394_unit_SOURCES = probe-ieee1394-unit.c ../../logger.c
hald_probe_ieee1394_unit_LDADD = $(top_builddir)/libhal/libhal.la
hald_probe_net_bluetooth_SOURCES = probe-net-bluetooth.c ../../logger.c
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hal-0.5.12/hald/linux/probing/probe-volume.c new/hal-0.5.12/hald/linux/probing/probe-volume.c
--- old/hal-0.5.12/hald/linux/probing/probe-volume.c 2008-11-07 15:20:43.000000000 +0100
+++ new/hal-0.5.12/hald/linux/probing/probe-volume.c 2008-11-15 14:23:04.000000000 +0100
@@ -42,12 +42,116 @@
#include
#include
+#include
#include "libhal/libhal.h"
#include "partutil/partutil.h"
#include "linux_dvd_rw_utils.h"
#include "../../logger.h"
+static void vid_log(int priority, const char *file, int line, const char *format, ...)
+{
+ char log_str[1024];
+ va_list args;
+
+ va_start(args, format);
+ vsnprintf(log_str, sizeof(log_str), format, args);
+ logger_forward_debug("%s:%i %s\n", file, line, log_str);
+ va_end(args);
+}
+
+static gchar *
+strdup_valid_utf8 (const char *str)
+{
+ char *endchar;
+ char *newstr;
+ unsigned int fixes;
+
+ if (str == NULL)
+ return NULL;
+
+ newstr = g_strdup (str);
+
+ fixes = 0;
+ while (!g_utf8_validate (newstr, -1, (const char **) &endchar)) {
+ *endchar = '_';
+ ++fixes;
+ }
+
+ /* If we had to fix more than 20% of the characters, give up */
+ if (fixes > 0 && g_utf8_strlen (newstr, -1) / fixes < 5) {
+ g_free (newstr);
+ newstr = g_strdup("");
+ }
+
+ return newstr;
+}
+
+
+static void
+set_volume_id_values (LibHalChangeSet *cs, struct volume_id *vid)
+{
+ char buf[256];
+ const char *usage;
+ const char *type;
+ const char *type_version;
+ const char *label;
+ const char *uuid;
+ DBusError error;
+
+ dbus_error_init (&error);
+
+ if (!volume_id_get_usage(vid, &usage))
+ usage = "";
+ libhal_changeset_set_property_string (cs, "volume.fsusage", usage);
+ HAL_DEBUG (("volume.fsusage = '%s'", usage));
+
+ if (!volume_id_get_type(vid, &type))
+ type = "";
+ if (!libhal_changeset_set_property_string (cs, "volume.fstype", type))
+ libhal_changeset_set_property_string (cs, "volume.fstype", "");
+ HAL_DEBUG(("volume.fstype = '%s'", type));
+
+ if (!volume_id_get_type_version(vid, &type_version))
+ type_version = "";
+ libhal_changeset_set_property_string (cs, "volume.fsversion", type_version);
+ HAL_DEBUG(("volume.fsversion = '%s'", type_version));
+
+ if (!volume_id_get_uuid(vid, &uuid))
+ uuid = "";
+ libhal_changeset_set_property_string (cs, "volume.uuid", uuid);
+ HAL_DEBUG(("volume.uuid = '%s'", uuid));
+
+ if (!volume_id_get_label(vid, &label))
+ label = "";
+
+ if (label[0] != '\0') {
+ char *volume_label;
+
+ /* we need to be sure for a utf8 valid label, because dbus accept only utf8 valid strings */
+ volume_label = strdup_valid_utf8 (label);
+ if( volume_label != NULL ) {
+ libhal_changeset_set_property_string (cs, "volume.label", volume_label);
+ HAL_DEBUG(("volume.label = '%s'", volume_label));
+
+ if (volume_label[0] != '\0') {
+ libhal_changeset_set_property_string (cs, "info.product", volume_label);
+ g_free(volume_label);
+ return;
+ }
+
+ g_free(volume_label);
+ }
+ }
+
+ if (type[0] != '\0') {
+ snprintf (buf, sizeof (buf), "Volume (%s)", type);
+ } else {
+ snprintf (buf, sizeof (buf), "Volume (unknown)");
+ }
+ libhal_changeset_set_property_string (cs, "info.product", buf);
+}
+
static void
advanced_disc_detect (LibHalChangeSet *cs, int fd, const char *device_file)
{
@@ -207,10 +311,12 @@
LibHalContext *ctx = NULL;
DBusError error;
char *parent_udi;
+ struct volume_id *vid;
char *stordev_dev_file;
char *partition_number_str;
char *partition_start_str;
char *is_disc_str;
+ char *fsusage;
dbus_bool_t is_disc;
unsigned int partition_number;
guint64 partition_start;
@@ -225,6 +331,9 @@
cs = NULL;
disc_may_have_data = FALSE;
+ /* hook in our debug into libvolume_id */
+ volume_id_log_fn = vid_log;
+
setup_logger ();
/* assume failure */
@@ -256,6 +365,8 @@
else
is_disc = FALSE;
+ fsusage = getenv ("HAL_PROP_VOLUME_FSUSAGE");
+
dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
goto out;
@@ -495,8 +606,15 @@
}
}
+ if (fsusage != NULL && strlen(fsusage) > 0) {
+ HAL_DEBUG(("have already information about fsusage from udev, no need to probe for filesystem"));
+ should_probe_for_fs = FALSE;
+ }
+
if (should_probe_for_fs) {
+ HAL_DEBUG(("start probing for filesystem ..."));
+
if ((stordev_dev_file = libhal_device_get_property_string (
ctx, parent_udi, "block.device", &error)) == NULL) {
goto out;
@@ -510,9 +628,76 @@
vol_size = 0;
}
- if (disc_may_have_data) {
- libhal_changeset_set_property_bool (cs, "volume.disc.is_blank", FALSE);
- libhal_changeset_set_property_bool (cs, "volume.disc.has_data", TRUE);
+ /* probe for file system */
+ vid = volume_id_open_fd (fd);
+ if (vid != NULL) {
+ int vid_ret;
+ HAL_INFO (("invoking volume_id_probe_all, offset=%d, size=%d", vol_probe_offset, vol_size));
+ vid_ret = volume_id_probe_all (vid, vol_probe_offset, vol_size);
+ HAL_INFO (("volume_id_probe_all returned %d", vid_ret));
+
+ if (vid_ret != 0 && is_disc && vol_probe_offset != 0) {
+ /* Some cd-rom drives report the offset of the session in the cd's TOC
+ * wrong. Fallback to probing at offset 0, just to be sure */
+ HAL_INFO (("invoking volume_id_probe_all, offset=0, size=%d", vol_size));
+ vid_ret = volume_id_probe_all (vid, 0 , vol_size);
+ HAL_INFO (("volume_id_probe_all returned %d", vid_ret));
+ }
+
+ if (vid_ret == 0) {
+ set_volume_id_values(cs, vid);
+ if (disc_may_have_data) {
+ libhal_changeset_set_property_bool (cs, "volume.disc.is_blank", FALSE);
+ libhal_changeset_set_property_bool (cs, "volume.disc.has_data", TRUE);
+ }
+ } else {
+ libhal_changeset_set_property_string (cs, "info.product", "Volume");
+ }
+
+ /* If we didn't detect anything, look whether it's a partition table (some Apple discs
+ * uses Apple Partition Map) and look at partitions
+ *
+ * (kind of a hack - ugh - we ought to export all these as fakevolumes... but
+ * this is good enough for now... the only discs I know of that does this
+ * is in fact Apple's install disc.)
+ */
+ if (vid_ret != 0 && is_disc) {
+ PartitionTable *p;
+ p = part_table_load_from_disk (stordev_dev_file);
+ if (p != NULL) {
+ int i;
+
+ HAL_INFO (("Partition table with scheme '%s' on optical disc",
+ part_get_scheme_name (part_table_get_scheme (p))));
+
+ for (i = 0; i < part_table_get_num_entries (p); i++) {
+ char *part_type;
+
+ part_type = part_table_entry_get_type (p, i);
+ HAL_INFO ((" partition %d has type '%s'", i, part_type));
+ if (strcmp (part_type, "Apple_HFS") == 0) {
+ guint64 part_offset;
+
+ part_offset = part_table_entry_get_offset (p, i);
+ if (volume_id_probe_all (
+ vid, vol_probe_offset + part_offset, 0) == 0) {
+
+ set_volume_id_values(cs, vid);
+ }
+
+ /* and we're done */
+ break;
+ }
+ g_free (part_type);
+ }
+
+
+ HAL_INFO (("Done looking at part table"));
+ part_table_free (p);
+ }
+ }
+
+ volume_id_close(vid);
}
/* get partition type number, if we find a msdos partition table */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org