summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2005-01-18 22:27:24 +0000
committerMarinus Schraal <foser@gentoo.org>2005-01-18 22:27:24 +0000
commitdfff8bbc3f0cb967ddbdff9c86889281004e0a5c (patch)
treeb5bb386417b6356915491435d456e32df5531f7c /sys-apps/hal
parentAdded ROOT to dosym. (diff)
downloadhistorical-dfff8bbc3f0cb967ddbdff9c86889281004e0a5c.tar.gz
historical-dfff8bbc3f0cb967ddbdff9c86889281004e0a5c.tar.bz2
historical-dfff8bbc3f0cb967ddbdff9c86889281004e0a5c.zip
add lockup fix for some wireless devices
Diffstat (limited to 'sys-apps/hal')
-rw-r--r--sys-apps/hal/ChangeLog8
-rw-r--r--sys-apps/hal/Manifest6
-rw-r--r--sys-apps/hal/files/digest-hal-0.4.5-r21
-rw-r--r--sys-apps/hal/files/hal-0.4.5-net_lockup.patch72
-rw-r--r--sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch98
-rw-r--r--sys-apps/hal/hal-0.4.5-r2.ebuild128
6 files changed, 311 insertions, 2 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog
index d33c898bf2c8..550fa0b0abcc 100644
--- a/sys-apps/hal/ChangeLog
+++ b/sys-apps/hal/ChangeLog
@@ -1,6 +1,12 @@
# 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.25 2005/01/17 13:09:55 foser Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.26 2005/01/18 22:27:24 foser Exp $
+
+*hal-0.4.5-r2 (18 Jan 2005)
+
+ 18 Jan 2005; foser <foser@gentoo.org> hal-0.4.5-r2.ebuild :
+ Add fix for #78564, requires some ugly checks for having a 2.6.10 kernel
+ Added some further ntfs/fat label detection fixes
*hal-0.4.5-r1 (17 Jan 2005)
diff --git a/sys-apps/hal/Manifest b/sys-apps/hal/Manifest
index 077774b8bf36..e96f07292c46 100644
--- a/sys-apps/hal/Manifest
+++ b/sys-apps/hal/Manifest
@@ -3,20 +3,24 @@ MD5 3421ea82543d71c44ee06c3f9605d775 hal-0.4.5-r1.ebuild 2592
MD5 f6c71019d8f7b2dab5ef13de1abd9244 hal-0.4.1-r1.ebuild 2567
MD5 8a56df2be3b94b0e0e958c48e6c14df5 hal-0.2.98-r1.ebuild 2102
MD5 4de36bde0054e10e722225fe4ffd6c6b hal-0.4.4-r1.ebuild 2758
-MD5 92855632db95579688246bf8605a2c10 ChangeLog 3734
+MD5 d38aa84d1e5894cda5bf18a47239ffcd hal-0.4.5-r2.ebuild 3238
+MD5 d5d6b599a8b8adcfe27cc7c2b3ec1c13 ChangeLog 3953
MD5 731695e9263a5a2e1eeba290b36078d5 metadata.xml 219
MD5 192112dfb678a9795a93d3cdcc50bb95 files/hald 543
MD5 2396bfac6dd9b68615328b1b9325ed2c files/hal-0.4.4-iso_label_selection.patch 1541
+MD5 442da36fd75002bb8300b0fcb65a1371 files/hal-0.4.5-vat_ntfs_labels.patch 2874
MD5 715f2a2e9a6980bae0823241ea50787f files/hal-0.4.0-allow-floppy-drives.patch 738
MD5 72d398ab014b2630043ef2a4d9990e2f files/digest-hal-0.2.98-r1 63
MD5 f1cf07edc63d04f0ef33911de97ea2f2 files/digest-hal-0.4.1-r1 62
MD5 a9afa7e41b21ea5f012765a8ced6c10d files/digest-hal-0.4.2-r1 62
MD5 11d67cf37182e289664f50de3ee6172f files/digest-hal-0.4.4-r1 62
MD5 ada3b2801b82813b4f10fd6f6caf9d6f files/digest-hal-0.4.5-r1 62
+MD5 ada3b2801b82813b4f10fd6f6caf9d6f files/digest-hal-0.4.5-r2 62
MD5 0693dbefb790150740986cce82039b82 files/hal-0.4.2-cdrom_media_check.patch 1194
MD5 399570c945e0f4bffbeb645e057e027b files/hal-0.4.1-dm_devices_tab.patch 1028
MD5 314ebeadb0a53e448e74ad6a3eead3f8 files/hal-0.4.4-check_ide_floppy_for_zip_fdi.patch 1920
MD5 2b00af86c624d74107035a007ac3c9da files/hal-0.4.4-volume_id_fat.patch 849
MD5 b0e12a62ce698e1eb2a32139498330cd files/hal-0.4.5-gentoo_gphoto2_usermap.patch 817
+MD5 f3ba6ada28cf947f8a7b7ec8fdd708ba files/hal-0.4.5-net_lockup.patch 2429
MD5 eeb1838cdb78726ab674194f0d268270 files/hal-0.4.2-fstab_sync_crash.patch 468
MD5 a0ce1c268e0b7d0967ec7b8e0d0d26d2 files/hal-0.4.1-old_storage_policy.patch 1216
diff --git a/sys-apps/hal/files/digest-hal-0.4.5-r2 b/sys-apps/hal/files/digest-hal-0.4.5-r2
new file mode 100644
index 000000000000..c4ca2b2c74d4
--- /dev/null
+++ b/sys-apps/hal/files/digest-hal-0.4.5-r2
@@ -0,0 +1 @@
+MD5 780d0bf4849c83ea4f8ab9b4102229c2 hal-0.4.5.tar.gz 1343158
diff --git a/sys-apps/hal/files/hal-0.4.5-net_lockup.patch b/sys-apps/hal/files/hal-0.4.5-net_lockup.patch
new file mode 100644
index 000000000000..3cca147332fe
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.4.5-net_lockup.patch
@@ -0,0 +1,72 @@
+===================================================================
+RCS file: /cvs/hal/hal/hald/linux/Attic/net_class_device.c,v
+retrieving revision 1.21.2.3
+retrieving revision 1.21.2.4
+diff -u -r1.21.2.3 -r1.21.2.4
+--- net_class_device.c 2005/01/07 03:07:45 1.21.2.3
++++ net_class_device.c 2005/01/17 20:00:30 1.21.2.4
+@@ -152,6 +152,8 @@
+ int res;
+ guint16 link_word;
+
++ HAL_INFO (("Entering"));
++
+ ifname = hal_device_property_get_string (d, "net.interface");
+
+ sockfd = socket (AF_INET, SOCK_DGRAM, 0);
+@@ -217,6 +219,8 @@
+ int res;
+ guint16 status_word;
+
++ HAL_INFO (("Entering"));
++
+ ifname = hal_device_property_get_string (d, "net.interface");
+
+ sockfd = socket (AF_INET, SOCK_DGRAM, 0);
+@@ -340,7 +344,12 @@
+ if (hal_device_has_capability (d, "net.80203")) {
+ if (!hal_device_property_get_bool (d, "net.80203.link")) {
+ hal_device_property_set_bool (d, "net.80203.link", TRUE);
++#ifdef SYSFS_CARRIER_ENABLE
++ HAL_INFO (("Assuming link speed is 100Mbps"));
++ hal_device_property_set_uint64 (d, "net.80203.rate", 100 * 1000 * 1000);
++#else /* SYSFS_CARRIER_ENABLE */
+ mii_get_rate (d);
++#endif /* SYSFS_CARRIER_ENABLE */
+ }
+ }
+ } else {
+@@ -617,7 +626,20 @@
+ if (!is_80211 && media_type == ARPHRD_ETHER) {
+ /* TODO: for some reason IFF_RUNNING isn't exported in flags */
+ /*hal_device_property_set_bool (d, "net.80203.link", flags & IFF_RUNNING);*/
++#ifdef SYSFS_CARRIER_ENABLE
++ attr = sysfs_get_classdev_attr (class_device, "carrier");
++ if (attr != NULL) {
++ int have_link;
++
++ have_link = parse_dec (attr->value);
++ HAL_INFO (("According to sysfs link status is %d", have_link));
++ hal_device_property_set_bool (d, "net.80203.link", have_link != 0);
++ HAL_INFO (("Assuming link speed is 100Mbps"));
++ hal_device_property_set_uint64 (d, "net.80203.rate", 100 * 1000 * 1000);
++ }
++#else /* SYSFS_CARRIER_ENABLE */
+ mii_get_link (d);
++#endif /* SYSFS_CARRIER_ENABLE */
+ }
+ }
+
+@@ -653,7 +675,12 @@
+
+ if (hal_device_has_property (d, "net.80203.link") &&
+ hal_device_property_get_bool (d, "net.80203.link")) {
++#ifdef SYSFS_CARRIER_ENABLE
++ HAL_INFO (("Assuming link speed is 100Mbps"));
++ hal_device_property_set_uint64 (d, "net.80203.rate", 100 * 1000 * 1000);
++#else /* SYSFS_CARRIER_ENABLE */
+ mii_get_rate (d);
++#endif /* SYSFS_CARRIER_ENABLE */
+ }
+
+ hal_device_property_set_int (d, "net.arp_proto_hw_id", media_type);
diff --git a/sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch b/sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch
new file mode 100644
index 000000000000..9bd6bf0399de
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.4.5-vat_ntfs_labels.patch
@@ -0,0 +1,98 @@
+===================================================================
+RCS file: /cvs/hal/hal/hald/linux/volume_id/Attic/volume_id.c,v
+retrieving revision 1.45.2.4
+retrieving revision 1.45.2.6
+diff -u -r1.45.2.4 -r1.45.2.6
+--- volume_id.c 2005/01/12 02:05:31 1.45.2.4
++++ volume_id.c 2005/01/17 15:25:00 1.45.2.6
+@@ -774,6 +774,8 @@
+ #define FAT16_MAX 0xfff5
+ #define FAT_ATTR_VOLUME_ID 0x08
+ #define FAT_ATTR_DIR 0x10
++#define FAT_ATTR_LONG_NAME 0x0f
++#define FAT_ATTR_MASK 0x3f
+ #define FAT_ENTRY_FREE 0xe5
+ static int probe_vfat(struct volume_id *id, __u64 off)
+ {
+@@ -859,6 +861,9 @@
+ /* believe only that's fat, don't trust the version
+ * the cluster_count will tell us
+ */
++ if (strncmp(vs->sysid, "NTFS", 4) == 0)
++ return -1;
++
+ if (strncmp(vs->type.fat32.magic, "MSWIN", 5) == 0)
+ goto valid;
+
+@@ -956,7 +961,7 @@
+
+ dir = (struct vfat_dir_entry*) buf;
+
+- for (i = 0; i <= root_dir_entries; i++) {
++ for (i = 0; i < root_dir_entries; i++) {
+ /* end marker */
+ if (dir[i].name[0] == 0x00) {
+ dbg("end of dir");
+@@ -967,7 +972,15 @@
+ if (dir[i].name[0] == FAT_ENTRY_FREE)
+ continue;
+
++ /* long name */
++ if ((dir[i].attr & FAT_ATTR_MASK) == FAT_ATTR_LONG_NAME)
++ continue;
++
+ if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) == FAT_ATTR_VOLUME_ID) {
++ /* labels do not have file data */
++ if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0)
++ continue;
++
+ dbg("found ATTR_VOLUME_ID id in root dir");
+ label = dir[i].name;
+ break;
+@@ -976,6 +989,10 @@
+ dbg("skip dir entry");
+ }
+
++ vs = (struct vfat_super_block *) get_buffer(id, off, 0x200);
++ if (vs == NULL)
++ return -1;
++
+ if (label != NULL && strncmp(label, "NO NAME ", 11) != 0) {
+ set_label_raw(id, label, 11);
+ set_label_string(id, label, 11);
+@@ -1015,7 +1032,7 @@
+ count = buf_size / sizeof(struct vfat_dir_entry);
+ dbg("expected entries 0x%x", count);
+
+- for (i = 0; i <= count; i++) {
++ for (i = 0; i < count; i++) {
+ /* end marker */
+ if (dir[i].name[0] == 0x00) {
+ dbg("end of dir");
+@@ -1026,7 +1043,15 @@
+ if (dir[i].name[0] == FAT_ENTRY_FREE)
+ continue;
+
++ /* long name */
++ if ((dir[i].attr & FAT_ATTR_MASK) == FAT_ATTR_LONG_NAME)
++ continue;
++
+ if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) == FAT_ATTR_VOLUME_ID) {
++ /* labels do not have file data */
++ if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0)
++ continue;
++
+ dbg("found ATTR_VOLUME_ID id in root dir");
+ label = dir[i].name;
+ goto fat32_label;
+@@ -1050,6 +1075,10 @@
+ dbg("reached maximum follow count of root cluster chain, give up");
+
+ fat32_label:
++ vs = (struct vfat_super_block *) get_buffer(id, off, 0x200);
++ if (vs == NULL)
++ return -1;
++
+ if (label != NULL && strncmp(label, "NO NAME ", 11) != 0) {
+ set_label_raw(id, label, 11);
+ set_label_string(id, label, 11);
diff --git a/sys-apps/hal/hal-0.4.5-r2.ebuild b/sys-apps/hal/hal-0.4.5-r2.ebuild
new file mode 100644
index 000000000000..e9ea56e9e36b
--- /dev/null
+++ b/sys-apps/hal/hal-0.4.5-r2.ebuild
@@ -0,0 +1,128 @@
+# 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.4.5-r2.ebuild,v 1.1 2005/01/18 22:27:24 foser Exp $
+
+inherit eutils python 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"
+
+RDEPEND=">=dev-libs/glib-2.4
+ >=sys-apps/dbus-0.22-r1
+ dev-libs/expat
+ sys-fs/udev
+ sys-apps/hotplug
+ sys-libs/libcap
+ dev-libs/popt
+ >=sys-apps/util-linux-2.12i
+ || ( >=sys-kernel/linux-headers-2.6 sys-kernel/linux26-headers )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=dev-util/intltool-0.29
+ doc? ( app-doc/doxygen )"
+# dep on a specific util-linux version for
+# managed mount patches #70873
+
+# We need to run at least a 2.6.10 kernel, this is a
+# way to ensure that to some extent
+pkg_setup() {
+
+ if get_version; then
+ kernel_is ge 2.6.10 && break
+ else
+ RKV=$(uname -r)
+ RKV=${RKV///-*}
+ if version_is_at_least "2.6.10" ${RKV}; then
+ break
+ fi
+ fi
+ die "You need a 2.6.10 or newer kernel to build this pack"
+
+}
+
+src_unpack() {
+
+ unpack ${A}
+
+ cd ${S}
+ # remove pamconsole option
+ epatch ${FILESDIR}/${PN}-0.4.1-old_storage_policy.patch
+ # pick up the gentoo usermap
+ epatch ${FILESDIR}/${P}-gentoo_gphoto2_usermap.patch
+ # fix issues with certain misbehaving kernel drivers (#78564)
+ cd ${S}/hald/linux
+ epatch ${FILESDIR}/${P}-net_lockup.patch
+ cd ${S}/hald/linux/volume_id
+ epatch ${FILESDIR}/${P}-vat_ntfs_labels.patch
+
+}
+
+src_compile() {
+
+ # use sysfs stuff added in 2.6.10 kernel
+ append-flags -DSYSFS_CARRIER_ENABLE
+
+ # FIXME : docs
+ econf \
+ `use_enable debug verbose-mode` \
+ `use_enable pcmcia pcmcia-support` \
+ --enable-fstab-sync \
+ --enable-hotplug-map \
+ --disable-docbook-docs \
+ `use_enable doc doxygen-docs` \
+ --with-pid-file=/var/run/hald/hald.pid \
+ || die
+
+ emake || die
+
+}
+
+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
+ exeinto /etc/init.d/
+ doexe ${FILESDIR}/hald
+
+ # place our pid file
+ keepdir /var/run/hald
+
+ dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
+
+}
+
+pkg_preinst() {
+
+ enewgroup haldaemon || die "Problem adding haldaemon group"
+ enewuser haldaemon -1 /bin/false /dev/null haldaemon || die "Problem adding haldaemon user"
+
+}
+
+pkg_postinst() {
+
+ # make sure the permissions on the pid dir are alright & after preinst
+ chown haldaemon:haldaemon /var/run/hald
+
+ ewarn "Enabled in this ebuild by default is the usage of fstab-sync"
+ ewarn "that will create mount rules for non-existing devices in"
+ ewarn "fstab if needed, mount points will be created in /media."
+ ewarn "This functionality alters /etc/fstab runtime on the filesystem"
+ ewarn "and should be considered a security risk."
+ echo
+ 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\`"
+
+}