summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2005-03-21 21:38:04 +0000
committerMarinus Schraal <foser@gentoo.org>2005-03-21 21:38:04 +0000
commit61ec48e66fe6eafa04e8f8a0979524620a8a7631 (patch)
tree6196aa9c891c1d7d22f8784e149906c6cce35c21 /sys-apps/hal
parentAdded ~sparc keyword wrt bug #86127. (diff)
downloadgentoo-2-61ec48e66fe6eafa04e8f8a0979524620a8a7631.tar.gz
gentoo-2-61ec48e66fe6eafa04e8f8a0979524620a8a7631.tar.bz2
gentoo-2-61ec48e66fe6eafa04e8f8a0979524620a8a7631.zip
patch it up
Diffstat (limited to 'sys-apps/hal')
-rw-r--r--sys-apps/hal/ChangeLog7
-rw-r--r--sys-apps/hal/Manifest4
-rw-r--r--sys-apps/hal/files/digest-hal-0.4.7-r11
-rw-r--r--sys-apps/hal/files/hal-0.4.7-device_info_leak.patch91
-rw-r--r--sys-apps/hal/files/hal-0.4.7-dont_add_device_twice-r1.patch14
-rw-r--r--sys-apps/hal/hal-0.4.7-r1.ebuild126
6 files changed, 242 insertions, 1 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog
index 648488316803..869d0e14ea9c 100644
--- a/sys-apps/hal/ChangeLog
+++ b/sys-apps/hal/ChangeLog
@@ -1,6 +1,11 @@
# 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.29 2005/02/20 11:51:52 lanius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.30 2005/03/21 21:38:04 foser Exp $
+
+*hal-0.4.7-r1 (21 Mar 2004)
+
+ 21 Mar 2005; foser <foser@gentoo.org> hal-0.4.7-r1.ebuild :
+ Add memleak fix & coldplug double add of devices patches
20 Feb 2005; Heinrich Wendel <lanius@gentoo.org> hal-0.4.5-r2.ebuild:
move back to testing, it requires a 2.6.10 kernel which is not yet stable on
diff --git a/sys-apps/hal/Manifest b/sys-apps/hal/Manifest
index 665abda91262..272d0f21bfa4 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 36505713171944ef26671bc5e3543634 hal-0.4.7-r1.ebuild 3136
MD5 44a481d4c6e15c48545c076eaff5520f hal-0.4.5-r2.ebuild 3237
MD5 6d15c6f967eef14fd384511fae2ea11e ChangeLog 4314
MD5 2a96836a252f05c62f1df2bc078d6804 hal-0.4.7.ebuild 2986
MD5 731695e9263a5a2e1eeba290b36078d5 metadata.xml 219
MD5 192112dfb678a9795a93d3cdcc50bb95 files/hald 543
+MD5 64253ef1f2dcf68b2d82429026280085 files/hal-0.4.7-dont_add_device_twice-r1.patch 691
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 4325d06adcb7a01cbc071c17e3e47d0d files/hal-0.4.7-device_info_leak.patch 2505
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 3031a9fe74f43859c313d5f3076e68cd files/digest-hal-0.4.7-r1 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 3031a9fe74f43859c313d5f3076e68cd files/digest-hal-0.4.7 62
diff --git a/sys-apps/hal/files/digest-hal-0.4.7-r1 b/sys-apps/hal/files/digest-hal-0.4.7-r1
new file mode 100644
index 000000000000..031b4dff3230
--- /dev/null
+++ b/sys-apps/hal/files/digest-hal-0.4.7-r1
@@ -0,0 +1 @@
+MD5 3386817a6811cce803bcfa8a20b05c51 hal-0.4.7.tar.gz 1349064
diff --git a/sys-apps/hal/files/hal-0.4.7-device_info_leak.patch b/sys-apps/hal/files/hal-0.4.7-device_info_leak.patch
new file mode 100644
index 000000000000..899089e7160d
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.4.7-device_info_leak.patch
@@ -0,0 +1,91 @@
+===================================================================
+RCS file: /cvs/hal/hal/hald/device_info.c,v
+retrieving revision 1.25
+retrieving revision 1.26
+diff -u -r1.25 -r1.26
+--- device_info.c 2005/02/25 01:55:08 1.25
++++ device_info.c 2005/02/28 01:16:47 1.26
+@@ -1218,15 +1218,22 @@
+ XML_Parser parser;
+ ParsingContext *parsing_context;
+
+- snprintf (buf, 511, "%s/%s", dir, filename);
++ file = NULL;
++ filebuf = NULL;
++ parser = NULL;
++ parsing_context = NULL;
++
++ device_matched = FALSE;
++
++ snprintf (buf, sizeof (buf), "%s/%s", dir, filename);
+
+ /*HAL_INFO(("analysing file %s", buf)); */
+
+ /* open file and read it into a buffer; it's a small file... */
+ file = fopen (buf, "r");
+ if (file == NULL) {
+- perror ("fopen");
+- return FALSE;
++ HAL_ERROR (("Could not open file %s", buf));
++ goto out;
+ }
+
+ fseek (file, 0L, SEEK_END);
+@@ -1234,25 +1241,27 @@
+ rewind (file);
+ filebuf = (char *) malloc (filesize);
+ if (filebuf == NULL) {
+- perror ("malloc");
+- fclose (file);
+- return FALSE;
++ HAL_ERROR (("Could not allocate %d bytes for file %s", filesize, buf));
++ goto out;
+ }
+ fread (filebuf, sizeof (char), filesize, file);
+
+-
+- /* ok, now parse the file (should probably reuse parser and say we are
+- * not thread safe
+- */
+- parser = XML_ParserCreate (NULL);
+-
+ /* initialize parsing context */
+ parsing_context =
+ (ParsingContext *) malloc (sizeof (ParsingContext));
+ if (parsing_context == NULL) {
+- perror ("malloc");
+- return FALSE;
++ HAL_ERROR (("Could not allocate parsing context"));
++ goto out;
++ }
++
++ /* TODO: reuse parser
++ */
++ parser = XML_ParserCreate (NULL);
++ if (parser == NULL) {
++ HAL_ERROR (("Could not allocate XML parser"));
++ goto out;
+ }
++
+ parsing_context->depth = 0;
+ parsing_context->device_matched = FALSE;
+ parsing_context->match_ok = TRUE;
+@@ -1287,9 +1296,15 @@
+ device_matched = parsing_context->device_matched;
+ }
+
+- free (filebuf);
+- fclose (file);
+- free (parsing_context);
++out:
++ if (filebuf != NULL)
++ free (filebuf);
++ if (file != NULL)
++ fclose (file);
++ if (parser != NULL)
++ XML_ParserFree (parser);
++ if (parsing_context != NULL)
++ free (parsing_context);
+
+ return device_matched;
+ }
diff --git a/sys-apps/hal/files/hal-0.4.7-dont_add_device_twice-r1.patch b/sys-apps/hal/files/hal-0.4.7-dont_add_device_twice-r1.patch
new file mode 100644
index 000000000000..1a311239f3f9
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.4.7-dont_add_device_twice-r1.patch
@@ -0,0 +1,14 @@
+--- hald/linux/osspec.c 2005-01-23 22:57:01.000000000 +0100
++++ hald/linux/osspec.c 2005-03-14 17:35:19.000000000 +0100
+@@ -1010,6 +1010,11 @@ add_device (const char *given_sysfs_path
+
+ strncpy (sysfs_path, given_sysfs_path, SYSFS_PATH_MAX);
+
++ if (hal_device_store_match_key_value_string (hald_get_gdl (), "linux.sysfs_path", sysfs_path)) {
++ HAL_WARNING (("devpath %s already present in the store, don't add device", sysfs_path));
++ return NULL;
++ }
++
+ len1 = snprintf (buf1, SYSFS_PATH_MAX, "%s/block", sysfs_mount_path);
+ len2 = snprintf (buf2, SYSFS_PATH_MAX, "%s/class", sysfs_mount_path);
+ if (strncmp (sysfs_path, buf1, len1) == 0 || strncmp (sysfs_path, buf2, len2) == 0) {
diff --git a/sys-apps/hal/hal-0.4.7-r1.ebuild b/sys-apps/hal/hal-0.4.7-r1.ebuild
new file mode 100644
index 000000000000..483d49e41213
--- /dev/null
+++ b/sys-apps/hal/hal-0.4.7-r1.ebuild
@@ -0,0 +1,126 @@
+# 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.7-r1.ebuild,v 1.1 2005/03/21 21:38:04 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}/${PN}-0.4.5-gentoo_gphoto2_usermap.patch
+ # don't doubleadd devices
+ epatch ${FILESDIR}/${P}-dont_add_device_twice-r1.patch
+ # fix memleaks
+ cd ${S}/hald
+ epatch ${FILESDIR}/${P}-device_info_leak.patch
+
+}
+
+src_compile() {
+
+ # FIXME : docs
+ econf \
+ `use_enable debug verbose-mode` \
+ `use_enable pcmcia pcmcia-support` \
+ --enable-sysfs-carrier \
+ --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\`"
+
+}