diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2007-01-30 16:42:06 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2007-01-30 16:42:06 +0000 |
commit | ef7c1f29e3c3e8cc9226c62882284abe9cfbe578 (patch) | |
tree | ac043b5af3aed593ccf193590193daa5afa08771 /sys-apps | |
parent | Uses automake 1.9; bug #164159 (diff) | |
download | gentoo-2-ef7c1f29e3c3e8cc9226c62882284abe9cfbe578.tar.gz gentoo-2-ef7c1f29e3c3e8cc9226c62882284abe9cfbe578.tar.bz2 gentoo-2-ef7c1f29e3c3e8cc9226c62882284abe9cfbe578.zip |
Fixed hotplug depend. Fixed installing old unused udev rule. Fix for bug #133743 from Gilles Dartiguelongue <dartigug@esiee.fr>. Fix bug #154648. Fix bug #158304. Fix bug #163233.
(Portage version: 2.1.2-r5)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/hal/ChangeLog | 15 | ||||
-rw-r--r-- | sys-apps/hal/files/digest-hal-0.5.5.1-r3 | 3 | ||||
-rw-r--r-- | sys-apps/hal/files/digest-hal-0.5.7.1-r4 (renamed from sys-apps/hal/files/digest-hal-0.5.7.1-r2) | 0 | ||||
-rw-r--r-- | sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch | 94 | ||||
-rw-r--r-- | sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch | 11 | ||||
-rw-r--r-- | sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch | 217 | ||||
-rw-r--r-- | sys-apps/hal/files/hal-0.5.7.1-hibernate-fix-r1.patch | 12 | ||||
-rw-r--r-- | sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch | 49 | ||||
-rw-r--r-- | sys-apps/hal/hal-0.5.5.1-r3.ebuild | 131 | ||||
-rw-r--r-- | sys-apps/hal/hal-0.5.7.1-r3.ebuild | 3 | ||||
-rw-r--r-- | sys-apps/hal/hal-0.5.7.1-r4.ebuild (renamed from sys-apps/hal/hal-0.5.7.1-r2.ebuild) | 28 |
11 files changed, 397 insertions, 166 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog index 4399a5c2c93d..8284a3f82bd9 100644 --- a/sys-apps/hal/ChangeLog +++ b/sys-apps/hal/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for sys-apps/hal # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.121 2007/01/29 15:49:40 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.122 2007/01/30 16:42:06 cardoe Exp $ + +*hal-0.5.7.1-r4 (30 Jan 2007) + + 30 Jan 2007; Doug Goldstein <cardoe@gentoo.org> + +files/hal-0.5.7.1-autofs-subfs.patch, + +files/hal-0.5.7.1-floppies-fix.patch, + +files/hal-0.5.7.1-hald-scripts.patch, + -files/hal-0.5.7.1-hibernate-fix-r1.patch, + +files/hal-0.5.7.1-ipod-nano.patch, -hal-0.5.5.1-r3.ebuild, + -hal-0.5.7.1-r2.ebuild, hal-0.5.7.1-r3.ebuild, +hal-0.5.7.1-r4.ebuild: + Fixed hotplug depend. Fixed installing old unused udev rule. Fix for bug + #133743 from Gilles Dartiguelongue <dartigug@esiee.fr>. Fix bug #154648. Fix + bug #158304. Fix bug #163233. 29 Jan 2007; Gustavo Zacarias <gustavoz@gentoo.org> hal-0.5.7.1-r3.ebuild: Stable on sparc wrt #162942 diff --git a/sys-apps/hal/files/digest-hal-0.5.5.1-r3 b/sys-apps/hal/files/digest-hal-0.5.5.1-r3 deleted file mode 100644 index 368d081d356e..000000000000 --- a/sys-apps/hal/files/digest-hal-0.5.5.1-r3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 2abd81ed3f5a37789f4fbda2f6a61270 hal-0.5.5.1.tar.gz 1517882 -RMD160 fad4ec6a23d8dc26bb20b659e4f9ff86e7bc62d0 hal-0.5.5.1.tar.gz 1517882 -SHA256 e89ab31aede3b689ef5cd54a17a3db1a2e7e868bd2d0b4b8f53a9b259723b8ee hal-0.5.5.1.tar.gz 1517882 diff --git a/sys-apps/hal/files/digest-hal-0.5.7.1-r2 b/sys-apps/hal/files/digest-hal-0.5.7.1-r4 index 3042516ecf0a..3042516ecf0a 100644 --- a/sys-apps/hal/files/digest-hal-0.5.7.1-r2 +++ b/sys-apps/hal/files/digest-hal-0.5.7.1-r4 diff --git a/sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch b/sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch new file mode 100644 index 000000000000..9d4e6f53431c --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch @@ -0,0 +1,94 @@ +diff -Naur hal-0.5.7-orig/hald/linux2/blockdev.c hal-0.5.7/hald/linux2/blockdev.c +--- hal-0.5.7-orig/hald/linux2/blockdev.c 2006-02-24 07:29:06 +0300 ++++ hal-0.5.7/hald/linux2/blockdev.c 2006-06-02 23:45:51 +0400 +@@ -185,6 +185,7 @@ + dev_t devt = makedev(0, 0); + GSList *volumes = NULL; + GSList *volume; ++ GSList *autofs_mounts = NULL; + + /* open /proc/mounts */ + g_snprintf (buf, sizeof (buf), "%s/mounts", get_hal_proc_path ()); +@@ -205,6 +206,43 @@ + while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) { + struct stat statbuf; + ++ /* If this is a nfs mount or autofs ++ * (fstype == 'nfs' || fstype == 'autofs') ++ * ignore the mount. Reason: ++ * 1. we don't list nfs devices in HAL ++ * 2. more problematic: stat on mountpoints with ++ * 'stale nfs handle' never come ++ * back and block complete HAL and all applications ++ * using HAL fail. ++ * 3. autofs and HAL butt heads causing drives to never ++ * be unmounted ++ */ ++ if (strcmp(mnt.mnt_type, "nfs") == 0) ++ continue; ++ ++ /* If this is an autofs mount (fstype == 'autofs' or fstype == 'subfs') ++ * store the mount in a list for later use. ++ * On mounts managed by autofs or subfs accessing files below the mount ++ * point cause the mount point to be remounted after an ++ * unmount. We keep the list so we do not check for ++ * the .created-by-hal file on mounts under autofs or subfs mount points ++ */ ++ if (strcmp(mnt.mnt_type, "autofs") == 0 || ++ strcmp(mnt.mnt_type, "subfs") == 0) { ++ char *mnt_dir; ++ ++ if (mnt.mnt_dir[strlen (mnt.mnt_dir) - 1] != '/') ++ mnt_dir = g_strdup_printf ("%s/", mnt.mnt_dir); ++ else ++ mnt_dir = g_strdup (mnt.mnt_dir); ++ ++ autofs_mounts = g_slist_append (autofs_mounts, ++ mnt_dir); ++ ++ ++ continue; ++ } ++ + /* check the underlying device of the mount point */ + if (stat (mnt.mnt_dir, &statbuf) != 0) + continue; +@@ -242,6 +280,7 @@ + HalDevice *dev; + char *mount_point; + char *mount_point_hal_file; ++ GSList *autofs_node; + + dev = HAL_DEVICE (volume->data); + mount_point = g_strdup (hal_device_property_get_string (dev, "volume.mount_point")); +@@ -251,8 +290,20 @@ + device_property_atomic_update_end (); + HAL_INFO (("set %s to unmounted", hal_device_get_udi (dev))); + ++ /* check to see if mount point falls under autofs */ ++ autofs_node = autofs_mounts; ++ while (autofs_node != NULL) { ++ char *am = (char *)autofs_node->data; ++ ++ if (strncmp (am, mount_point, strlen (am)) == 0); ++ break; ++ ++ autofs_node = autofs_node->next; ++ } ++ + mount_point_hal_file = g_strdup_printf ("%s/.created-by-hal", mount_point); +- if (g_file_test (mount_point_hal_file, G_FILE_TEST_EXISTS)) { ++ if (!autofs_node && ++ g_file_test (mount_point_hal_file, G_FILE_TEST_EXISTS)) { + char *cleanup_stdin; + char *extra_env[2]; + +@@ -279,6 +330,8 @@ + g_free (mount_point); + } + g_slist_free (volumes); ++ g_slist_foreach (autofs_mounts, (GFunc) g_free, NULL); ++ g_slist_free (autofs_mounts); + exit: + endmntent (f); + } diff --git a/sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch b/sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch new file mode 100644 index 000000000000..3d259627ba65 --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch @@ -0,0 +1,11 @@ +diff -Naur hal-0.5.7.1.orig/hald/linux2/hotplug.c hal-0.5.7.1/hald/linux2/hotplug.c +--- hal-0.5.7.1.orig/hald/linux2/hotplug.c 2007-01-22 15:31:45.322111812 +0100 ++++ hal-0.5.7.1/hald/linux2/hotplug.c 2007-01-22 15:31:15.594276651 +0100 +@@ -283,6 +283,7 @@ + + len = strlen(hotplug_event->sysfs.sysfs_path); + is_partition = (isdigit(hotplug_event->sysfs.sysfs_path[len - 1]) ++ && (! strstr(hotplug_event->sysfs.sysfs_path, "/block/fd")) + && ! strstr(hotplug_event->sysfs.sysfs_path, "/block/sr")) || + strstr (hotplug_event->sysfs.sysfs_path, "/fakevolume") ; + diff --git a/sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch b/sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch new file mode 100644 index 000000000000..3403a23b310a --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch @@ -0,0 +1,217 @@ +# this patch modifies a lot of script in tools, please double check +# before adding another patch on top of it. +# +Index: tools/hal-system-lcd-get-brightness +=================================================================== +RCS file: /cvs/hal/hal/tools/hal-system-lcd-get-brightness,v +retrieving revision 1.7 +diff -u -r1.7 hal-system-lcd-get-brightness +--- hal-0.5.7/tools/hal-system-lcd-get-brightness 18 Feb 2006 23:11:23 -0000 1.7 ++++ hal-0.5.7/tools/hal-system-lcd-get-brightness 19 Feb 2006 22:44:22 -0000 +@@ -8,13 +8,13 @@ + # (at your option) any later version. + + # Check for environment variables +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "" ]; then ++if [ -z "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" ]; then + echo "Missing or empty environment variable(s)." >&2 + echo "This script should be started by hald." >&2 + exit 1 + fi + +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then ++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then + value="`hal-system-power-pmu getlcd`" + if [ $? -ne 0 ]; then + echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2 +@@ -24,37 +24,37 @@ + fi + + # Check for file existance and that it's readable +-if [ ! -r $HAL_PROP_LINUX_ACPI_PATH ]; then ++if [ ! -r "$HAL_PROP_LINUX_ACPI_PATH" ]; then + echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2 + echo "$1 not readable!" >&2 + exit 1 + fi + +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "toshiba" ]; then ++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then + # cat /proc/acpi/toshiba/lcd + # brightness: 5 + # brightness_levels: 8 + value="`cat $HAL_PROP_LINUX_ACPI_PATH | grep brightness: | awk '{print $2;}'`" +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "asus" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then + # cat /proc/acpi/asus/brn + # 5 + value="`cat $HAL_PROP_LINUX_ACPI_PATH`" +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "panasonic" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then + # cat /proc/acpi/pcc/brightness + # 5 + value="`cat $HAL_PROP_LINUX_ACPI_PATH`" +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "ibm" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then + # cat /proc/acpi/ibm/brightness + # level: 5 + # commands: up, down + # commands: level <level> (<level> is 0-7) + value="`cat $HAL_PROP_LINUX_ACPI_PATH | grep level: | awk '{print $2;}'`" +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "sony" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then + # cat /proc/acpi/sony/brightness + # 5 + value="`cat $HAL_PROP_LINUX_ACPI_PATH`" + let "value = ${value} - 1" +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then + # cat /proc/omnibook/lcd + # LCD brightness: 7 + value="`cat $HAL_PROP_LINUX_ACPI_PATH | awk '{print $3;}'`" +Index: tools/hal-system-lcd-set-brightness +=================================================================== +RCS file: /cvs/hal/hal/tools/hal-system-lcd-set-brightness,v +retrieving revision 1.7 +diff -u -r1.7 hal-system-lcd-set-brightness +--- hal-0.5.7/tools/hal-system-lcd-set-brightness 18 Feb 2006 23:11:23 -0000 1.7 ++++ hal-0.5.7/tools/hal-system-lcd-set-brightness 19 Feb 2006 22:44:23 -0000 +@@ -8,8 +8,8 @@ + # (at your option) any later version. + + # Check for environment variables +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "" ] || +- [ "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" == "" ] ; then ++if [ -z "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" ] || ++ [ -z "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" ] ; then + echo "Missing or empty environment variable(s)." >&2 + echo "This script should be started by hald." >&2 + exit 1 +@@ -18,7 +18,14 @@ + # read value for set brightness + read value + +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then ++# Check for values outside range ++if [ ${value} -lt 0 ] || [ ${value} -gt $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS ]; then ++ echo "org.freedesktop.Hal.Device.LaptopPanel.Invalid" >&2 ++ echo "Brightness has to be between 0 and $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS!" >&2 ++ exit 1 ++fi ++ ++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then + hal-system-power-pmu setlcd $value + if [ $? -ne 0 ]; then + echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2 +@@ -28,39 +35,33 @@ + fi + + # Check for file existance and that it's writable +-if [ ! -w $HAL_PROP_LINUX_ACPI_PATH ]; then ++if [ ! -w "$HAL_PROP_LINUX_ACPI_PATH" ]; then + echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2 + echo "$1 not writable!" >&2 + exit 1 + fi + +-# Check for values outside range +-if [ ${value} -lt 0 ] || [ ${value} -gt $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS ]; then +- echo "org.freedesktop.Hal.Device.LaptopPanel.Invalid" >&2 +- echo "Brightness has to be between 0 and $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS!" >&2 +- exit 1 +-fi + +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "toshiba" ]; then ++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then + # echo "brightness: {0..x}" >/proc/acpi/toshiba/lcd + echo "brightness: $value" > $HAL_PROP_LINUX_ACPI_PATH +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "asus" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then + # echo {0..15} > /proc/acpi/asus/brn + # http://www.taupro.com/wiki/ChemBook/LCDdisplayPowerConfiguration + echo "$value" > $HAL_PROP_LINUX_ACPI_PATH +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "panasonic" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then + # echo {0..15} > /proc/acpi/pcc/brightness + # http://readlist.com/lists/vger.kernel.org/linux-kernel/7/36405.html + echo "$value" > $HAL_PROP_LINUX_ACPI_PATH +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "ibm" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then + # echo "level {0..7}" > /proc/acpi/ibm/brightness + # http://ibm-acpi.sourceforge.net/README + echo "level $value" > $HAL_PROP_LINUX_ACPI_PATH +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "sony" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then + # echo "{1..8}" > /proc/acpi/sony/brightness + # http://popies.net/sonypi/2.6-sony_acpi4.patch + echo "$value" > $HAL_PROP_LINUX_ACPI_PATH +-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then ++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then + # echo "{0..7}" > /proc/omnibook/lcd + # http://bugzilla.gnome.org/show_bug.cgi?id=331458 + echo "$value" > $HAL_PROP_LINUX_ACPI_PATH +Index: tools/hal-system-power-hibernate +=================================================================== +RCS file: /cvs/hal/hal/tools/hal-system-power-hibernate,v +retrieving revision 1.6 +diff -u -r1.6 hal-system-power-hibernate +--- hal-0.5.7/tools/hal-system-power-hibernate 16 Jan 2006 12:47:40 -0000 1.6 ++++ hal-0.5.7/tools/hal-system-power-hibernate 19 Feb 2006 22:44:23 -0000 +@@ -43,8 +43,9 @@ + # Suspend2 tools installed + /usr/sbin/hibernate --force + RET=$? +- elif [ -w "/sys/power/state" ] ; then +- # Use the raw kernel sysfs interface ++ elif [ -w "/sys/power/state" ] && ++ [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" != pmu ] ; then ++ # Use the raw kernel sysfs interface if possible (not on pmu yet) + echo "disk" > /sys/power/state + RET=$? + else +Index: tools/hal-system-power-suspend +=================================================================== +RCS file: /cvs/hal/hal/tools/hal-system-power-suspend,v +retrieving revision 1.6 +diff -u -r1.6 hal-system-power-suspend +--- hal-0.5.7/tools/hal-system-power-suspend 2007-01-18 22:50:15.000000000 +0100 ++++ hal-0.5.7/tools/hal-system-power-suspend 2007-01-18 22:53:04.000000000 +0100 +@@ -18,15 +18,6 @@ + + read seconds_to_sleep + +-#PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl +-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then +- hal-system-power-pmu sleep +- if [ $? -ne 0 ]; then +- echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2 +- exit 1 +- fi +- exit 0 +-fi + + #SuSE and ALTLinux only support powersave + if [ -f "/etc/altlinux-release" ] || [ -f "/etc/SuSE-release" ] ; then +@@ -62,6 +53,13 @@ + elif [ -x "/usr/sbin/pmi" ] ; then + /usr/sbin/pmi action suspend force + RET=$? ++ elif [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then ++ #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl ++ hal-system-power-pmu sleep ++ RET=$? ++ elif [ -x "/usr/sbin/hibernate-ram" ] ; then ++ /usr/sbin/hibernate-ram ++ RET=$? + elif [ -w "/sys/power/state" ] ; then + # Use the raw kernel sysfs interface + echo "mem" > /sys/power/state +@@ -72,4 +70,8 @@ + fi + fi + ++if [ $RET -ne 0 ]; then ++ echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2 ++ exit 1 ++fi + exit $RET diff --git a/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix-r1.patch b/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix-r1.patch deleted file mode 100644 index 71a299b713d0..000000000000 --- a/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix-r1.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- tools/hal-system-power-suspend 2006-02-19 00:00:55.000000000 +0100 -+++ tools/hal-system-power-suspend2 2006-09-23 11:22:42.000000000 +0200 -@@ -62,6 +62,9 @@ - elif [ -x "/usr/sbin/pmi" ] ; then - /usr/sbin/pmi action suspend force - RET=$? -+ elif [ -x "/usr/sbin/hibernate-ram" ] ; then -+ /usr/sbin/hibernate-ram -+ RET=$? - elif [ -w "/sys/power/state" ] ; then - # Use the raw kernel sysfs interface - echo "mem" > /sys/power/state diff --git a/sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch b/sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch new file mode 100644 index 000000000000..803c59d9b54c --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch @@ -0,0 +1,49 @@ +--- hal-0.5.7.1/volume_id/via_raid.c 2006-02-21 20:15:17.000000000 +0100 ++++ hal-0.5.7.1/volume_id/via_raid.c-new 2006-12-16 17:48:31.000000000 +0100 +@@ -3,6 +3,9 @@ + * + * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org> + * ++ * Based on information taken from dmraid: ++ * Copyright (C) 2004-2006 Heinz Mauelshagen, Red Hat GmbH ++ * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2 of the License. +@@ -31,7 +34,7 @@ + uint16_t signature; + uint8_t version_number; + struct via_array { +- uint16_t disk_bits; ++ uint16_t disk_bit_mask; + uint8_t disk_array_ex; + uint32_t capacity_low; + uint32_t capacity_high; +@@ -43,6 +46,17 @@ + + #define VIA_SIGNATURE 0xAA55 + ++/* 8 bit checksum on first 50 bytes of metadata. */ ++static uint8_t meta_checksum(struct via_meta *via) ++{ ++ uint8_t i = 50, sum = 0; ++ ++ while (i--) ++ sum += ((uint8_t*) via)[i]; ++ ++ return sum == via->checksum; ++} ++ + int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size) + { + const uint8_t *buf; +@@ -68,6 +82,9 @@ + if (via->version_number > 1) + return -1; + ++ if (!meta_checksum(via)) ++ return -1; ++ + volume_id_set_usage(id, VOLUME_ID_RAID); + snprintf(id->type_version, sizeof(id->type_version)-1, "%u", via->version_number); + id->type = "via_raid_member"; diff --git a/sys-apps/hal/hal-0.5.5.1-r3.ebuild b/sys-apps/hal/hal-0.5.5.1-r3.ebuild deleted file mode 100644 index d5c3d5a8f51c..000000000000 --- a/sys-apps/hal/hal-0.5.5.1-r3.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.5.1-r3.ebuild,v 1.16 2007/01/05 04:41:12 flameeyes Exp $ - -inherit eutils linux-info - -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="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86" -IUSE="acpi debug doc pam_console pcmcia selinux" - -RDEPEND=">=dev-libs/glib-2.6 - >=sys-apps/dbus-0.50 - >=sys-fs/udev-071 - >=sys-apps/util-linux-2.12i - || ( >=sys-kernel/linux-headers-2.6 >=sys-kernel/mips-headers-2.6 ) - dev-libs/expat - dev-libs/libusb - sys-apps/hotplug - pam_console? ( sys-libs/pam ) - selinux? ( sys-libs/libselinux )" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=dev-util/intltool-0.29 - doc? ( app-doc/doxygen app-text/docbook-sgml-utils )" - -## HAL Daemon drops privledges so we need group access to read disks -HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy,usb" - -function notify_uevent() { - eerror - eerror "You must enable Kernel Userspace Events in your kernel." - eerror "This can be set under 'General Setup'. It is marked as" - eerror "CONFIG_KOBJECT_UEVENT in the config file." - eerror - ebeep 5 - - die "KOBJECT_UEVENT is not set" -} - -pkg_setup() { - linux-info_pkg_setup - - kernel_is ge 2 6 13 \ - || die "You need a 2.6.13 or newer kernel to run this package" - - if kernel_is lt 2 6 15; then - linux_chkconfig_present KOBJECT_UEVENT || notify_uevent - fi - - if use acpi ; then - linux_chkconfig_present PROC_FS \ - || die "ACPI support requires PROC_FS support in kernel" - fi - - 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 "${ROOT}"/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}"/${P}-RBC.patch - - # remove pamconsole option - use pam_console || epatch "${FILESDIR}"/${PN}-0.5.1-old_storage_policy.patch -} - -src_compile() { - econf \ - --with-doc-dir=/usr/share/doc/${PF} \ - --with-os-type=gentoo \ - --with-pid-file=/var/run/hald.pid \ - $(use_enable debug verbose-mode) \ - $(use_enable pcmcia pcmcia-support) \ - $(use_enable acpi acpi-proc) \ - $(use_enable doc docbook-docs) \ - $(use_enable doc doxygen-docs) \ - $(use_enable selinux) \ - || die "configure failed" - -# --disable-acpi-acpid when HAL handles all that acpid handles - - 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 ChangeLog NEWS README - - # Script to unmount devices if they are yanked out (from upstream) - exeinto /etc/dev.d/default - doexe "${FILESDIR}"/hal-unmount.dev -} - -pkg_preinst() { - enewgroup haldaemon || die "Problem adding haldaemon group" - enewuser haldaemon -1 "-1" -1 ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user" - usermod -G ${HALDAEMON_GROUPS} haldaemon -} - -pkg_postinst() { - 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/hal-0.5.7.1-r3.ebuild b/sys-apps/hal/hal-0.5.7.1-r3.ebuild index e42e49db2aa6..700aa2010786 100644 --- a/sys-apps/hal/hal-0.5.7.1-r3.ebuild +++ b/sys-apps/hal/hal-0.5.7.1-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r3.ebuild,v 1.9 2007/01/29 15:49:40 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r3.ebuild,v 1.10 2007/01/30 16:42:06 cardoe Exp $ inherit eutils linux-info @@ -23,7 +23,6 @@ RDEPEND=">=dev-libs/glib-2.6 sys-libs/libcap sys-apps/pciutils dev-libs/libusb - sys-apps/hotplug-base virtual/eject dmi? ( >=sys-apps/dmidecode-2.7 ) crypt? ( >=sys-fs/cryptsetup-luks-1.0.1 ) diff --git a/sys-apps/hal/hal-0.5.7.1-r2.ebuild b/sys-apps/hal/hal-0.5.7.1-r4.ebuild index 512717f97bda..9a1772edf000 100644 --- a/sys-apps/hal/hal-0.5.7.1-r2.ebuild +++ b/sys-apps/hal/hal-0.5.7.1-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r2.ebuild,v 1.5 2007/01/18 05:34:42 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r4.ebuild,v 1.1 2007/01/30 16:42:06 cardoe Exp $ inherit eutils linux-info @@ -23,7 +23,6 @@ RDEPEND=">=dev-libs/glib-2.6 sys-libs/libcap sys-apps/pciutils dev-libs/libusb - sys-apps/hotplug-base virtual/eject dmi? ( >=sys-apps/dmidecode-2.7 ) crypt? ( >=sys-fs/cryptsetup-luks-1.0.1 ) @@ -99,7 +98,7 @@ src_unpack() { epatch "${FILESDIR}"/${PN}-0.5.7.1-ignored-volumes.patch # Fix bash in hald scripts - epatch "${FILESDIR}"/${PN}-0.5.7-hald-scripts.patch + epatch "${FILESDIR}"/${PN}-0.5.7.1-hald-scripts.patch # probe partition table epatch "${FILESDIR}"/${PN}-0.5.7-part-table.patch @@ -116,17 +115,20 @@ src_unpack() { # rescan devices on resume epatch "${FILESDIR}"/${PN}-0.5.7-rescan-on-resume.patch - # detect hibernate-ram script as well - epatch "${FILESDIR}"/${PN}-0.5.7-hibernate.patch - # dbus deprecated dbus_connection_disconnect epatch "${FILESDIR}"/${PN}-0.5.7.1-dbus-close.patch # sr driver fix epatch "${FILESDIR}"/${PN}-0.5.7.1-sr-driver.patch - # hibernate sequence fix - epatch "${FILESDIR}"/${PN}-0.5.7.1-hibernate-fix.patch + # mounting autofs & subfs fixes + epatch "${FILESDIR}"/${PN}-0.5.7.1-autofs-subfs.patch + + # iPod Nano detected as RAID fix + epatch "${FILESDIR}"/${PN}-0.5.7.1-ipod-nano.patch + + # Floppies mounting fix + epatch "${FILESDIR}"/${PN}-0.5.7.1-floppies-fix.patch } src_compile() { @@ -142,7 +144,7 @@ src_compile() { --with-doc-dir=/usr/share/doc/${PF} \ --with-os-type=gentoo \ --with-pid-file=/var/run/hald.pid \ - --with-data=${hwdata} + --with-hwdata=${hwdata} \ --enable-hotplug-map \ $(use_enable debug verbose-mode) \ $(use_enable pcmcia pcmcia-support) \ @@ -162,17 +164,9 @@ src_install() { # remove dep on gnome-python mv "${D}"/usr/bin/hal-device-manager "${D}"/usr/share/hal/device-manager/ - # hal umount for unclean unmounts - exeinto /lib/udev/ - newexe "${FILESDIR}"/hal-unmount.dev hal_unmount - # initscript newinitd "${FILESDIR}"/0.5-hald.rc hald - # Script to unmount devices if they are yanked out (from upstream) - exeinto /etc/dev.d/default - doexe "${FILESDIR}"/hal-unmount.dev - # We now create and keep /media here as both gnome-mount and pmount # use these directories, to avoid collision. dodir /media |