summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2005-08-18 07:19:37 +0000
committerDoug Goldstein <cardoe@gentoo.org>2005-08-18 07:19:37 +0000
commit512859b8386eec5f15b431eebaf3464fad558011 (patch)
treead052400083c4a50405979d1f69738637a8f453e /sys-apps/hal
parentAdded sys-apps/hal:pam_console (diff)
downloadhistorical-512859b8386eec5f15b431eebaf3464fad558011.tar.gz
historical-512859b8386eec5f15b431eebaf3464fad558011.tar.bz2
historical-512859b8386eec5f15b431eebaf3464fad558011.zip
Added HAL 0.5.x to the tree as per Gnome herd's request. Added self to maintainership for receiving these issues.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'sys-apps/hal')
-rw-r--r--sys-apps/hal/ChangeLog10
-rw-r--r--sys-apps/hal/Manifest36
-rwxr-xr-xsys-apps/hal/files/0.5-hald.rc24
-rw-r--r--sys-apps/hal/files/digest-hal-0.5.21
-rw-r--r--sys-apps/hal/files/hal-0.5.1-old_storage_policy.patch12
-rw-r--r--sys-apps/hal/files/hal-udev-63.patch361
-rw-r--r--sys-apps/hal/files/hal-unmount.dev17
-rw-r--r--sys-apps/hal/hal-0.5.2.ebuild130
-rw-r--r--sys-apps/hal/metadata.xml4
9 files changed, 584 insertions, 11 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog
index 44dd84e346bc..26e86f448506 100644
--- a/sys-apps/hal/ChangeLog
+++ b/sys-apps/hal/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/hal
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.41 2005/06/17 20:46:58 hansmi Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.42 2005/08/18 07:19:37 cardoe Exp $
+
+*hal-0.5.2 (18 Aug 2005)
+
+ 18 Aug 2005; Doug Goldstein <cardoe@gentoo.org> metadata.xml,
+ +hal-0.5.2.ebuild, +hal-unmount.dev, +0.5-hald.rc,
+ +hal-0.5.1-old_storage_policy.patch:
+ added HAL 0.5.2, but masked, as per Gnome herd's request.
+ Added self to maintainership so I can work out 0.5.x issues
17 Jun 2005; Michael Hanselmann <hansmi@gentoo.org> hal-0.4.7-r2.ebuild:
Stable on ppc.
diff --git a/sys-apps/hal/Manifest b/sys-apps/hal/Manifest
index 2be05bfd8f3a..f2f2449e0a1e 100644
--- a/sys-apps/hal/Manifest
+++ b/sys-apps/hal/Manifest
@@ -1,18 +1,34 @@
-MD5 731695e9263a5a2e1eeba290b36078d5 metadata.xml 219
-MD5 d9e92f8a73079c3de188a6f175076500 ChangeLog 5831
-MD5 df2ac94f707d025736cc3a86619b0740 hal-0.4.7-r2.ebuild 3454
-MD5 2cf5b3c9219c87b1d9aee01f4f5f19bb hal-0.4.5-r2.ebuild 3118
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 ac0323dde0a5d61a80b263a33d24842b ChangeLog 6137
+MD5 977cac248188f771c2993bda1624004f hal-0.5.2.ebuild 4113
MD5 3305724319ca1a9b454eb5dc7565ba13 hal-0.4.8.ebuild 3375
-MD5 c1624c9456f164c1b611e3ab22fb105d files/hal-0.4.7-device_info_leak.patch 2203
-MD5 f3ba6ada28cf947f8a7b7ec8fdd708ba files/hal-0.4.5-net_lockup.patch 2429
+MD5 2cf5b3c9219c87b1d9aee01f4f5f19bb hal-0.4.5-r2.ebuild 3118
+MD5 df2ac94f707d025736cc3a86619b0740 hal-0.4.7-r2.ebuild 3454
+MD5 a60767d83157413d549c69b98fac962c metadata.xml 303
+MD5 40a7b45f127bfdcacaa142660ad8b5f9 files/0.5-hald.rc 537
+MD5 2bbbb519c89110dfec96cf63cf541afc files/digest-hal-0.4.8 62
MD5 e3ecbfe57c0833d32f0ea57a0de58aee files/hal-0.4.8-fix_dvdram.patch 465
+MD5 25cb64ec27a48a80126b6de5ff6c3340 files/hal-0.5.1-old_storage_policy.patch 856
+MD5 59350c54dd02ac43fb991dfc0390d488 files/hal-udev-63.patch 11451
MD5 ada3b2801b82813b4f10fd6f6caf9d6f files/digest-hal-0.4.5-r2 62
+MD5 7ee3fd5b5ee117f14633350e5b335c2f files/hal-unmount.dev 397
+MD5 edc428d4dcf7103d2fc8dfeb961e2f43 files/digest-hal-0.5.2 62
MD5 3031a9fe74f43859c313d5f3076e68cd files/digest-hal-0.4.7-r2 62
-MD5 192112dfb678a9795a93d3cdcc50bb95 files/hald 543
-MD5 2bbbb519c89110dfec96cf63cf541afc files/digest-hal-0.4.8 62
-MD5 64253ef1f2dcf68b2d82429026280085 files/hal-0.4.7-dont_add_device_twice-r1.patch 691
MD5 a0ce1c268e0b7d0967ec7b8e0d0d26d2 files/hal-0.4.1-old_storage_policy.patch 1216
-MD5 442da36fd75002bb8300b0fcb65a1371 files/hal-0.4.5-vat_ntfs_labels.patch 2874
MD5 b0e12a62ce698e1eb2a32139498330cd files/hal-0.4.5-gentoo_gphoto2_usermap.patch 817
+MD5 f3ba6ada28cf947f8a7b7ec8fdd708ba files/hal-0.4.5-net_lockup.patch 2429
+MD5 442da36fd75002bb8300b0fcb65a1371 files/hal-0.4.5-vat_ntfs_labels.patch 2874
+MD5 c1624c9456f164c1b611e3ab22fb105d files/hal-0.4.7-device_info_leak.patch 2203
+MD5 64253ef1f2dcf68b2d82429026280085 files/hal-0.4.7-dont_add_device_twice-r1.patch 691
MD5 58ed07e2de5e898a1e4eeedf595ddb06 files/hal-0.4.7-sys_floppy_detection.patch 568
MD5 a4d2c4884a3dedf2450cf37508d3c122 files/hal-0.4.7-vfat_mount_utf8.patch 670
+MD5 192112dfb678a9795a93d3cdcc50bb95 files/hald 543
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDBDaqBtvusYtCZMsRAh9qAJ47hR6mCnWOYn1N7IB78IiiJwjCBgCfew/L
+M/MZdPVVSOhuchGs4qb8SpU=
+=WqpA
+-----END PGP SIGNATURE-----
diff --git a/sys-apps/hal/files/0.5-hald.rc b/sys-apps/hal/files/0.5-hald.rc
new file mode 100755
index 000000000000..7a3ca0ba5242
--- /dev/null
+++ b/sys-apps/hal/files/0.5-hald.rc
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5-hald.rc,v 1.1 2005/08/18 07:19:37 cardoe Exp $
+
+depend() {
+ need dbus hotplug
+}
+
+start() {
+ ebegin "Starting Hardware Abstraction Layer daemon"
+
+ start-stop-daemon --start -q --exec /usr/sbin/hald
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Hardware Abstraction Layer daemon"
+
+ start-stop-daemon --stop -q --pidfile /var/run/hald.pid
+
+ eend $?
+}
diff --git a/sys-apps/hal/files/digest-hal-0.5.2 b/sys-apps/hal/files/digest-hal-0.5.2
new file mode 100644
index 000000000000..23f8913cc44d
--- /dev/null
+++ b/sys-apps/hal/files/digest-hal-0.5.2
@@ -0,0 +1 @@
+MD5 3b351822ba359669646026013a3d5a03 hal-0.5.2.tar.gz 1419810
diff --git a/sys-apps/hal/files/hal-0.5.1-old_storage_policy.patch b/sys-apps/hal/files/hal-0.5.1-old_storage_policy.patch
new file mode 100644
index 000000000000..d84732ce7c9b
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.1-old_storage_policy.patch
@@ -0,0 +1,12 @@
+--- fdi/policy/10osvendor/10-storage-policy.fdi.old 2005-03-29 15:19:35.000000000 -0500
++++ fdi/policy/10osvendor/10-storage-policy.fdi 2005-05-08 06:29:18.000000000 -0400
+@@ -10,7 +10,8 @@
+ <merge key="storage.policy.default.managed_keyword.primary" type="string">managed</merge>
+ <merge key="storage.policy.default.managed_keyword.secondary" type="string">kudzu</merge>
+ <merge key="storage.policy.default.mount_option.noauto" type="bool">true</merge>
+- <merge key="storage.policy.default.mount_option.pamconsole" type="bool">true</merge>
++ <merge key="storage.policy.default.mount_option.pamconsole" type="bool">false</merge>
++ <merge key="storage.policy.default.mount_option.user" type="bool">true</merge>
+ <merge key="storage.policy.default.mount_option.exec" type="bool">true</merge>
+ </match>
+ </device>
diff --git a/sys-apps/hal/files/hal-udev-63.patch b/sys-apps/hal/files/hal-udev-63.patch
new file mode 100644
index 000000000000..4dbcdda7f42f
--- /dev/null
+++ b/sys-apps/hal/files/hal-udev-63.patch
@@ -0,0 +1,361 @@
+Index: hald/linux2/coldplug.c
+===================================================================
+RCS file: /cvs/hal/hal/hald/linux2/coldplug.c,v
+retrieving revision 1.15
+diff -u -p -r1.15 coldplug.c
+--- hald/linux2/coldplug.c 27 Apr 2005 18:53:39 -0000 1.15
++++ hald/linux2/coldplug.c 5 Jul 2005 17:31:18 -0000
+@@ -53,6 +53,8 @@
+ #define DMPREFIX "dm-"
+
+
++static GHashTable *sysfs_to_dev_map;
++static char dev_root[HAL_PATH_MAX];
+
+ /* Returns the path of the udevinfo program
+ *
+@@ -65,14 +67,14 @@ hal_util_get_udevinfo_path (void)
+ struct stat s;
+ static gchar *path = NULL;
+ gchar *possible_paths[] = {
+- "/sbin/udevinfo",
+ "/usr/bin/udevinfo",
++ "/bin/udevinfo",
+ "/usr/sbin/udevinfo",
+- "/usr/local/sbin/udevinfo"
++ "/sbin/udevinfo",
+ };
+
+ if (path != NULL)
+- return path;
++ return path;
+
+ for (i = 0; i < sizeof (possible_paths) / sizeof (char *); i++) {
+ if (stat (possible_paths[i], &s) == 0 && S_ISREG (s.st_mode)) {
+@@ -83,15 +85,15 @@ hal_util_get_udevinfo_path (void)
+ return path;
+ }
+
+-static GHashTable *
+-hal_util_get_sysfs_to_dev_map (void)
++
++static gboolean
++hal_util_init_sysfs_to_dev_map (void)
+ {
+- GHashTable *sysfs_to_dev_map;
+- char *udevinfo_argv[7] = {NULL, "-d", NULL};
++ char *udevdump_argv[] = { "/usr/bin/udevinfo", "-d", NULL };
++ char *udevroot_argv[] = { "/usr/bin/udevinfo", "-r", NULL };
+ char *udevinfo_stdout;
+- char *udevinfo_stderr;
+ int udevinfo_exitcode;
+- char *p;
++ char *p;
+ char *q;
+ char *r;
+ int len;
+@@ -101,37 +103,48 @@ hal_util_get_sysfs_to_dev_map (void)
+ gboolean has_more_lines;
+
+ sysfs_mount_path = get_hal_sysfs_path ();
+-
+ sysfs_to_dev_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
++ udevdump_argv[0] = (char *) hal_util_get_udevinfo_path ();
++ udevroot_argv[0] = (char *) hal_util_get_udevinfo_path ();
+
+- /* get path to udevinfo */
+- udevinfo_argv[0] = (char *) hal_util_get_udevinfo_path ();
+- if (udevinfo_argv[0] == NULL)
++ /* get udevroot */
++ if (g_spawn_sync ("/", udevroot_argv, NULL, 0, NULL, NULL,
++ &udevinfo_stdout,
++ NULL,
++ &udevinfo_exitcode,
++ NULL) != TRUE) {
++ HAL_ERROR (("Couldn't invoke %s", udevroot_argv[0]));
+ goto error;
++ }
++ if (udevinfo_exitcode != 0) {
++ HAL_ERROR (("%s returned %d", udevroot_argv[0], udevinfo_exitcode));
++ goto error;
++ }
+
+-
+- /* Invoke udevinfo */
+- if (udevinfo_argv[0] == NULL || g_spawn_sync ("/",
+- udevinfo_argv,
+- NULL,
+- 0,
+- NULL,
+- NULL,
+- &udevinfo_stdout,
+- &udevinfo_stderr,
+- &udevinfo_exitcode,
+- NULL) != TRUE) {
+- HAL_ERROR (("Couldn't invoke %s", udevinfo_argv[0]));
++ g_strlcpy(dev_root, udevinfo_stdout, sizeof(dev_root));
++ p = strchr(dev_root, '\n');
++ if (p)
++ p[0] = '\0';
++ g_free(udevinfo_stdout);
++ HAL_INFO (("dev_root is %s", dev_root));
++
++ /* get udevdump */
++ if (g_spawn_sync ("/", udevdump_argv, NULL, 0, NULL, NULL,
++ &udevinfo_stdout,
++ NULL,
++ &udevinfo_exitcode,
++ NULL) != TRUE) {
++ HAL_ERROR (("Couldn't invoke %s", udevdump_argv[0]));
++ g_free(udevinfo_stdout);
+ goto error;
+ }
+
+ if (udevinfo_exitcode != 0) {
+- HAL_ERROR (("%s returned %d", udevinfo_argv[0], udevinfo_exitcode));
++ HAL_ERROR (("%s returned %d", udevdump_argv[0], udevinfo_exitcode));
+ goto error;
+ }
+
+ has_more_lines = TRUE;
+-
+ p = udevinfo_stdout;
+
+ do {
+@@ -142,7 +155,7 @@ hal_util_get_sysfs_to_dev_map (void)
+
+ for (q = p; *q != '\n' && *q != '\0' && *q != '='; q++)
+ ;
+-
++
+ len = q - p;
+ switch (*q) {
+ case '=':
+@@ -162,12 +175,12 @@ hal_util_get_sysfs_to_dev_map (void)
+ HAL_ERROR (("Expected '=', not '%c' in line '%s'", *q, p));
+ goto error;
+ }
+-
++
+ q++;
+ r = q;
+ for ( ; *q != '\n' && *q != '\0'; q++)
+ ;
+-
++
+ len = q - r;
+ switch (*q) {
+ case '\0':
+@@ -178,7 +191,6 @@ hal_util_get_sysfs_to_dev_map (void)
+ strncpy (device_file, r, len > PATH_MAX ? PATH_MAX : len);
+ device_file [len > PATH_MAX ? PATH_MAX : len] = '\0';
+ break;
+-
+ default:
+ HAL_ERROR (("Expected '\\n' or '\\0', not '%c' in line '%s'", *q, p));
+ goto error;
+@@ -186,7 +198,7 @@ hal_util_get_sysfs_to_dev_map (void)
+
+ g_hash_table_insert (sysfs_to_dev_map, g_strdup_printf ("%s%s", sysfs_mount_path, sysfs_path),
+ g_strdup(device_file));
+-
++
+ #ifdef HAL_COLDPLUG_VERBOSE
+ printf ("Got '%s' -> '%s'\n", sysfs_path, device_file);
+ #endif
+@@ -194,22 +206,54 @@ hal_util_get_sysfs_to_dev_map (void)
+
+ } while (has_more_lines);
+
+- return sysfs_to_dev_map;
++ g_free(udevinfo_stdout);
++ return TRUE;
+
+ error:
++ g_free(udevinfo_stdout);
+ g_hash_table_destroy (sysfs_to_dev_map);
+- return NULL;
++ return FALSE;
+ }
+
++static gchar
++*coldplug_get_device_file(const gchar *sysfs_path)
++{
++ const gchar *device_file;
++ const char *pos;
++ gchar path[HAL_PATH_MAX];
++ struct stat statbuf;
++
++ device_file = (gchar *) g_hash_table_lookup (sysfs_to_dev_map, sysfs_path);
++ if (device_file != NULL)
++ return g_strdup(device_file);
++
++ HAL_INFO (("sysfs_path %s not in udevdb", sysfs_path));
++
++ /* device is not in udevdb, use the default kernel name */
++ pos = strrchr(sysfs_path, '/');
++ if (pos == NULL)
++ return NULL;
++
++ g_strlcpy(path, dev_root, sizeof(path));
++ g_strlcat(path, pos, sizeof(path));
++ if (stat (path, &statbuf))
++ return NULL;
++
++ if (!S_ISBLK (statbuf.st_mode) && !S_ISCHR (statbuf.st_mode))
++ return NULL;
++
++ HAL_INFO (("return sysfs_path %s", path));
++
++ return g_strdup(path);
++}
+
+ static gboolean
+-coldplug_synthesize_block_event(const gchar *f, GHashTable *sysfs_to_dev_map);
++coldplug_synthesize_block_event(const gchar *f);
+
+ static void
+ coldplug_compute_visit_device (const gchar *path,
+ GHashTable *sysfs_to_bus_map,
+- GHashTable *sysfs_to_class_in_devices_map,
+- GHashTable *sysfs_to_dev_map);
++ GHashTable *sysfs_to_class_in_devices_map);
+
+ /* For debugging */
+ /*#define HAL_COLDPLUG_VERBOSE*/
+@@ -297,15 +341,11 @@ coldplug_synthesize_events (void)
+ */
+ GSList *sysfs_dm_dev = NULL;
+
+- GHashTable *sysfs_to_dev_map = NULL;
+-
+-
+- if ((sysfs_to_dev_map = hal_util_get_sysfs_to_dev_map ()) == NULL) {
++ if (hal_util_init_sysfs_to_dev_map () == FALSE) {
+ HAL_ERROR (("Unable to get sysfs to dev map"));
+ goto error;
+ }
+
+-
+ /* build bus map */
+ sysfs_to_bus_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ g_snprintf (path, HAL_PATH_MAX, "%s/bus", get_hal_sysfs_path ());
+@@ -431,7 +471,7 @@ coldplug_synthesize_events (void)
+ while ((f1 = g_dir_read_name (dir1)) != NULL) {
+
+ g_snprintf (path, HAL_PATH_MAX, "%s/devices/%s/%s", get_hal_sysfs_path (), f, f1);
+- coldplug_compute_visit_device (path, sysfs_to_bus_map, sysfs_to_class_in_devices_map, sysfs_to_dev_map);
++ coldplug_compute_visit_device (path, sysfs_to_bus_map, sysfs_to_class_in_devices_map);
+ }
+ g_dir_close (dir1);
+ }
+@@ -461,9 +501,10 @@ coldplug_synthesize_events (void)
+ g_strlcpy (hotplug_event->sysfs.subsystem, subsystem, sizeof (hotplug_event->sysfs.subsystem));
+ g_strlcpy (hotplug_event->sysfs.sysfs_path, sysfs_path, sizeof (hotplug_event->sysfs.sysfs_path));
+
+- device_file = (gchar *) g_hash_table_lookup (sysfs_to_dev_map, sysfs_path);
++ device_file = coldplug_get_device_file (sysfs_path);
+ if (device_file != NULL) {
+ strncpy (hotplug_event->sysfs.device_file, device_file, sizeof (hotplug_event->sysfs.device_file));
++ g_free (device_file);
+ }
+ hotplug_event->sysfs.net_ifindex = -1;
+
+@@ -487,12 +528,12 @@ coldplug_synthesize_events (void)
+ sysfs_dm_dev = g_slist_append(sysfs_dm_dev, g_strdup(f));
+ continue;
+ }
+- if (coldplug_synthesize_block_event(f, sysfs_to_dev_map) == FALSE)
++ if (coldplug_synthesize_block_event(f) == FALSE)
+ goto error;
+ }
+ /* process all dm devices last so that their backing devices exist */
+ for (li = sysfs_dm_dev; li != NULL; li = g_slist_next (g_slist_next (li))) {
+- if (coldplug_synthesize_block_event (li->data, sysfs_to_dev_map) == FALSE)
++ if (coldplug_synthesize_block_event (li->data) == FALSE)
+ goto error;
+ g_free (li->data);
+ }
+@@ -500,7 +541,7 @@ coldplug_synthesize_events (void)
+ g_dir_close (dir);
+
+ g_hash_table_destroy (sysfs_to_dev_map);
+-
++
+ return TRUE;
+ error:
+ HAL_ERROR (("Error building the orderered list of sysfs paths"));
+@@ -508,7 +549,7 @@ error:
+ }
+
+ static gboolean
+-coldplug_synthesize_block_event(const gchar *f, GHashTable *sysfs_to_dev_map)
++coldplug_synthesize_block_event(const gchar *f)
+ {
+ GDir *dir1;
+ gsize flen;
+@@ -540,9 +581,10 @@ coldplug_synthesize_block_event(const gc
+ g_strlcpy (hotplug_event->sysfs.subsystem, "block", sizeof (hotplug_event->sysfs.subsystem));
+ g_strlcpy (hotplug_event->sysfs.sysfs_path, path, sizeof (hotplug_event->sysfs.sysfs_path));
+
+- device_file = (gchar *) g_hash_table_lookup (sysfs_to_dev_map, path);
++ device_file = coldplug_get_device_file (path);
+ if (device_file != NULL) {
+ strncpy (hotplug_event->sysfs.device_file, device_file, sizeof (hotplug_event->sysfs.device_file));
++ g_free (device_file);
+ }
+
+ if (normalized_target != NULL)
+@@ -573,9 +615,10 @@ coldplug_synthesize_block_event(const gc
+ g_strlcpy (hotplug_event->sysfs.subsystem, "block", sizeof (hotplug_event->sysfs.subsystem));
+ g_strlcpy (hotplug_event->sysfs.sysfs_path, path1, sizeof (hotplug_event->sysfs.sysfs_path));
+ g_strlcpy (hotplug_event->sysfs.wait_for_sysfs_path, path, sizeof (hotplug_event->sysfs.wait_for_sysfs_path));
+- device_file = (gchar *) g_hash_table_lookup (sysfs_to_dev_map, path1);
++ device_file = coldplug_get_device_file (path1);
+ if (device_file != NULL) {
+ strncpy (hotplug_event->sysfs.device_file, device_file, sizeof (hotplug_event->sysfs.device_file));
++ g_free (device_file);
+ }
+ hotplug_event->sysfs.net_ifindex = -1;
+ hotplug_event_enqueue (hotplug_event);
+@@ -592,8 +635,7 @@ error:
+ static void
+ coldplug_compute_visit_device (const gchar *path,
+ GHashTable *sysfs_to_bus_map,
+- GHashTable *sysfs_to_class_in_devices_map,
+- GHashTable *sysfs_to_dev_map)
++ GHashTable *sysfs_to_class_in_devices_map)
+ {
+ gchar *bus;
+ GError *err = NULL;
+@@ -647,9 +689,10 @@ coldplug_compute_visit_device (const gch
+ g_strlcpy (hotplug_event->sysfs.subsystem, subsystem, sizeof (hotplug_event->sysfs.subsystem));
+ g_strlcpy (hotplug_event->sysfs.sysfs_path, sysfs_path, sizeof (hotplug_event->sysfs.sysfs_path));
+
+- device_file = (gchar *) g_hash_table_lookup (sysfs_to_dev_map, sysfs_path);
++ device_file = coldplug_get_device_file (sysfs_path);
+ if (device_file != NULL) {
+ strncpy (hotplug_event->sysfs.device_file, device_file, sizeof (hotplug_event->sysfs.device_file));
++ g_free (device_file);
+ }
+ if (path != NULL)
+ g_strlcpy (hotplug_event->sysfs.wait_for_sysfs_path, path, sizeof (hotplug_event->sysfs.wait_for_sysfs_path));
+@@ -669,7 +712,7 @@ coldplug_compute_visit_device (const gch
+ while ((f = g_dir_read_name (dir)) != NULL) {
+ gchar path_child[HAL_PATH_MAX];
+ struct stat statbuf;
+-
++
+ g_snprintf (path_child, HAL_PATH_MAX, "%s/%s", path, f);
+
+ if (lstat (path_child, &statbuf) == 0) {
+@@ -678,8 +721,7 @@ coldplug_compute_visit_device (const gch
+ /* recursion fun */
+ coldplug_compute_visit_device (path_child,
+ sysfs_to_bus_map,
+- sysfs_to_class_in_devices_map,
+- sysfs_to_dev_map);
++ sysfs_to_class_in_devices_map);
+ }
+ }
+ }
diff --git a/sys-apps/hal/files/hal-unmount.dev b/sys-apps/hal/files/hal-unmount.dev
new file mode 100644
index 000000000000..04d1fa81b597
--- /dev/null
+++ b/sys-apps/hal/files/hal-unmount.dev
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# sanity check. DEVNAME should start with a /
+[ "$DEVNAME" != "${DEVNAME#/}" ] || exit 0
+
+# Lazily unmount drives which are removed, but still mounted
+if [ "$ACTION" = remove ] \
+ && (grep -q "^$DEVNAME" /proc/mounts || grep -q "^$DEVNAME" /etc/mtab); then
+ if [ -x /usr/bin/pumount ] ; then
+ /usr/bin/pumount -l "$DEVNAME";
+ else
+ /bin/umount -l "$DEVNAME";
+ fi
+fi
+
+exit 0
+
diff --git a/sys-apps/hal/hal-0.5.2.ebuild b/sys-apps/hal/hal-0.5.2.ebuild
new file mode 100644
index 000000000000..eac2d7fed572
--- /dev/null
+++ b/sys-apps/hal/hal-0.5.2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.2.ebuild,v 1.1 2005/08/18 07:19:37 cardoe Exp $
+
+inherit eutils linux-info versionator flag-o-matic
+
+DESCRIPTION="Hardware Abstraction Layer"
+HOMEPAGE="http://www.freedesktop.org/Software/hal"
+SRC_URI="http://freedesktop.org/~david/dist/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 AFL-2.0 )"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ia64 ~ppc ~ppc64"
+IUSE="debug pcmcia doc pam_console"
+
+
+### We don't technically "need" pam, but without pam_console, stuff
+### doesn't work (particularly NetworkManager).
+### dep on a specific util-linux version for managed mount patches #70873
+RDEPEND=">=dev-libs/glib-2.6
+ >=sys-apps/dbus-0.33
+ dev-libs/expat
+ >=sys-fs/udev-063
+ sys-apps/hotplug
+ >=sys-apps/util-linux-2.12i
+ >=sys-kernel/linux-headers-2.6
+ dev-libs/libusb
+ pam_console? ( sys-libs/pam )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=dev-util/intltool-0.29
+ doc? ( app-doc/doxygen )"
+
+## HAL Daemon drops privledges so we need group access to read disks
+HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy"
+
+# We need to run at least a 2.6.10 kernel, this is a
+# way to ensure that to some extent
+pkg_setup() {
+
+ linux-info_pkg_setup
+ kernel_is ge 2 6 10 \
+ || die "You need a 2.6.10 or newer kernel to run this package"
+
+ if use pam_console && ! built_with_use sys-libs/pam pam_console ; then
+ eerror "You need to build pam with pam_console support"
+ eerror "Please remerge sys-libs/pam with USE=pam_console"
+ die "pam without pam_console detected"
+ fi
+
+ if [ -d ${D}/etc/hal/device.d ]; then
+ eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
+ eerror "/etc/hal/device.d/ so please remove this directory"
+ eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
+ eerror "This is due to configuration protection of /etc/"
+ die "remove /etc/hal/device.d/"
+ fi
+}
+
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/hal-udev-63.patch
+ # remove pamconsole option
+ use pam_console || epatch ${FILESDIR}/${PN}-0.5.1-old_storage_policy.patch
+}
+
+src_compile() {
+
+ local myconf
+
+ # NOTE: fstab-sync dies at an assert() and is deprecated upstream.
+ # As such, no need to support it.
+ econf \
+ `use_enable debug verbose-mode` \
+ `use_enable pcmcia pcmcia-support` \
+ --enable-sysfs-carrier \
+ --enable-hotplug-map \
+ `use_enable doc docbook-docs` \
+ `use_enable doc doxygen-docs` \
+ --with-pid-file=/var/run/hald.pid \
+ || die "configure failed"
+
+ emake || die "make failed"
+
+}
+
+src_install() {
+
+ make DESTDIR=${D} install || die
+
+ # We install this in a seperate package to avoid gnome-python dep
+ rm ${D}/usr/bin/hal-device-manager
+
+ # initscript
+ newinitd ${FILESDIR}/0.5-hald.rc hald
+
+ dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
+
+ # Script to unmount devices if they are yanked out (from upstream)
+ exeinto /etc/dev.d/default
+ doexe ${FILESDIR}/hal-unmount.dev
+
+
+}
+
+pkg_postinst() {
+ ##
+ ## The old hal ran as root. This was *very* bad because of all the user IO that HAL does.
+ ## The new hal runs as 'haldaemon', but haldaemon needs to be in the appropriate groups to work.
+ ## Below is a hack to make this transition (upgrade from previous versions) smooth.
+ ## We need to add the user/groups *after* package compilation/installation, so that we
+ ## don't change the user without the package being installed.
+ ##
+ enewgroup haldaemon || die "Problem adding haldaemon group"
+ # HAL drops priviledges by default now ...
+ # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
+ enewuser haldaemon -1 /bin/false /dev/null ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
+
+ # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
+ # If users have a problem with this, let them file a bug
+ usermod -G ${HALDAEMON_GROUPS} haldaemon
+
+ einfo "The HAL daemon needs to be running for certain applications to"
+ einfo "work. Suggested is to add the init script to your start-up"
+ einfo "scripts, this should be done like this :"
+ einfo "\`rc-update add hald default\`"
+}
diff --git a/sys-apps/hal/metadata.xml b/sys-apps/hal/metadata.xml
index 3cfad92cea1d..0893f3085eb0 100644
--- a/sys-apps/hal/metadata.xml
+++ b/sys-apps/hal/metadata.xml
@@ -2,7 +2,11 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>gnome</herd>
+<herd>gentopia</herd>
<maintainer>
<email>foser@gentoo.org</email>
</maintainer>
+<maintainer>
+ <email>cardoe@gentoo.org</email>
+</maintainer>
</pkgmetadata>