summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2015-08-13 19:05:27 -0600
committerBrian Bidulock2015-08-13 19:05:27 -0600
commit8c3788a6c3fe8f05430a40c21713156fb90a830a (patch)
tree1bf5d0bdfc69a9dd75daa3ddce80021f3ca46c75
parentf751ed015001933b88ce80d4b455cbac100f9b27 (diff)
downloadaur-8c3788a6c3fe8f05430a40c21713156fb90a830a.tar.gz
version 0.5.15-1
-rw-r--r--.AURINFO31
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD63
-rw-r--r--badvok-compile-fix.patch12
-rw-r--r--hal-libudev-events.patch346
-rw-r--r--hal.patch603
-rw-r--r--hald54
-rw-r--r--udev-update.patch55
8 files changed, 23 insertions, 1169 deletions
diff --git a/.AURINFO b/.AURINFO
deleted file mode 100644
index b1c1c0e88a45..000000000000
--- a/.AURINFO
+++ /dev/null
@@ -1,31 +0,0 @@
-pkgbase = hal
- pkgdesc = Hardware Abstraction Layer
- pkgver = 0.5.14
- pkgrel = 21
- url = http://www.freedesktop.org/wiki/Software/hal
- install = hal.install
- arch = i686
- arch = x86_64
- license = GPL
- license = custom
- makedepends = gperf
- depends = dbus-glib>=0.82
- depends = libusb-compat
- depends = hal-info>=0.20090716
- depends = dmidecode
- depends = v4l-utils
- optdepends = acpid>=2.0
- optdepends = pm-utils>=1.2.5
- source = http://hal.freedesktop.org/releases/hal-0.5.14.tar.gz
- source = hald
- source = hal.service
- source = hal.patch
- source = udev-update.patch
- source = hal-glib-2.3-compile-fix.patch
- source = hal-libudev-events.patch
- source = badvok-compile-fix.patch
- options = !libtool
- options = !makeflags
-
-pkgname = hal
-
diff --git a/.SRCINFO b/.SRCINFO
index cdfd887f41f4..74d5b32c181b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = hal
pkgdesc = Hardware Abstraction Layer
- pkgver = 0.5.14
- pkgrel = 23
+ pkgver = 0.5.15
+ pkgrel = 1
url = http://www.freedesktop.org/wiki/Software/hal
install = hal.install
arch = i686
@@ -9,32 +9,20 @@ pkgbase = hal
license = GPL
license = custom
makedepends = gperf
- depends = dbus-glib>=0.82
+ depends = dbus-glib
depends = libusb-compat
- depends = hal-info>=0.20090716
+ depends = hal-info
depends = dmidecode
depends = v4l-utils
depends = pciutils
- optdepends = acpid>=2.0
- optdepends = pm-utils>=1.2.5
+ optdepends = acpid
+ optdepends = pm-utils
options = !libtool
options = !makeflags
- source = http://hal.freedesktop.org/releases/hal-0.5.14.tar.gz
- source = hald
+ source = https://github.com/bbidulock/hal/releases/download/HAL_0_5_15/hal-0.5.15.tar.gz
source = hal.service
- source = hal.patch
- source = udev-update.patch
- source = hal-glib-2.3-compile-fix.patch
- source = hal-libudev-events.patch
- source = badvok-compile-fix.patch
- md5sums = e9163df591a6f38f59fdbfe33e73bf20
- md5sums = 4cdfc673ad65ddb51919f5a757f62145
+ md5sums = a8a7d380f3791c818a08a5f74befe3aa
md5sums = ca4a7932fe7e8acbfa17245b62cc3b9b
- md5sums = 185dd5d6ffc703ec8395b4eb3a1ae498
- md5sums = 68209ba62b2a19537bfa459fdef70ed3
- md5sums = c126a66766118f83a171511832d1b619
- md5sums = d115a2f1793121b08dd58527c1530d0b
- md5sums = 7acfdd590c98272930ddfd37f1c7f5a3
pkgname = hal
diff --git a/PKGBUILD b/PKGBUILD
index ed15eeef0094..c88cda03aa42 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,77 +10,44 @@
# Contributor: deusstultus <deusstultus@gmail.com>
pkgname=hal
-pkgver=0.5.14
-pkgrel=23
+pkgver=0.5.15
+pkgrel=1
pkgdesc="Hardware Abstraction Layer"
arch=(i686 x86_64)
license=('GPL' 'custom')
-url="http://www.freedesktop.org/wiki/Software/hal"
-depends=('dbus-glib>=0.82' 'libusb-compat' 'hal-info>=0.20090716' 'dmidecode' 'v4l-utils' 'pciutils')
-optdepends=('acpid>=2.0' 'pm-utils>=1.2.5')
+url="http://www.freedesktop.org/wiki/Software/${pkgname}"
+depends=('dbus-glib' 'libusb-compat' 'hal-info' 'dmidecode' 'v4l-utils' 'pciutils')
+optdepends=('acpid' 'pm-utils')
makedepends=('gperf')
options=('!libtool' '!makeflags')
-install=hal.install
-source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
- hald
- hal.service
- hal.patch
- udev-update.patch
- hal-glib-2.3-compile-fix.patch
- hal-libudev-events.patch
- badvok-compile-fix.patch)
-
-md5sums=('e9163df591a6f38f59fdbfe33e73bf20'
- '4cdfc673ad65ddb51919f5a757f62145'
- 'ca4a7932fe7e8acbfa17245b62cc3b9b'
- '9285ba215509584baaa9e1b573c89416'
- '68209ba62b2a19537bfa459fdef70ed3'
- 'c126a66766118f83a171511832d1b619'
- 'd115a2f1793121b08dd58527c1530d0b'
- '7acfdd590c98272930ddfd37f1c7f5a3')
+install="${pkgname}.install"
+source=("https://github.com/bbidulock/${pkgname}/releases/download/${pkgname^^[a-z]}_${pkgver//\./_}/${pkgname}-${pkgver}.tar.gz"
+ "${pkgname}.service")
+md5sums=('a8a7d380f3791c818a08a5f74befe3aa'
+ 'ca4a7932fe7e8acbfa17245b62cc3b9b')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np0 -d ${srcdir} -i ${srcdir}/hal.patch
-
- patch -Np1 -i ${srcdir}/hal-libudev-events.patch
- patch -Np1 -i ${srcdir}/hal-glib-2.3-compile-fix.patch
- patch -Np1 -i ${srcdir}/udev-update.patch
- patch -Np1 -i ${srcdir}/badvok-compile-fix.patch
-
- # fix trialing space
- sed -i 's/failed; [\] /failed; \\/' policy/Makefile.am
-
- # fix subdir-objects mess in automake 1.14
- sed -i 's/AM_INIT_AUTOMAKE[(]\[gnu 1.9\][)]/AM_INIT_AUTOMAKE([subdir-objects])/' configure.in
-
- libtoolize --force
- aclocal
- autoupdate # required to fix obsolete macros
- autoconf
- automake --add-missing --warnings=all
-
+ cd ${pkgname}-${pkgver}
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
- --libexecdir=/usr/lib/hal --with-udev-prefix=/etc \
+ --libexecdir=/usr/lib/${pkgname} --with-udev-prefix=/etc \
--enable-static=no --disable-acpi-ibm \
--disable-docbook-docs --disable-console-kit \
--disable-policy-kit --disable-acl-management \
--enable-umount-helper --disable-smbios \
- --with-hal-user=hal --with-hal-group=hal \
+ --with-hal-user=${pkgname} --with-hal-group=${pkgname} \
--with-pid-file=/var/run/hald.pid \
--sbindir=/usr/bin --disable-gtk-doc
make
-
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
# These empty directories are required by hal to successfuly create its fdi-cache
- install -m755 -d "${pkgdir}/etc/hal/fdi/"{policy,preprobe,information}
+ install -m755 -d "${pkgdir}/etc/${pkgname}/fdi/"{policy,preprobe,information}
# udev-sockets support has been removed from udev. hal-libudev-events.patch fixes hal to get events from libudev
rm -r "${pkgdir}/etc/udev"
diff --git a/badvok-compile-fix.patch b/badvok-compile-fix.patch
deleted file mode 100644
index 83ed2de97ab8..000000000000
--- a/badvok-compile-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru hal-0.5.14-original/hald/linux/addons/addon-storage.c hal-0.5.14/hald/linux/addons/addon-storage.c
---- hal-0.5.14-original/hald/linux/addons/addon-storage.c 2013-01-06 01:15:17.195955506 -0800
-+++ hal-0.5.14/hald/linux/addons/addon-storage.c 2013-01-06 01:16:43.835764036 -0800
-@@ -32,6 +32,7 @@
- #include <linux/cdrom.h>
- #include <linux/fs.h>
- #include <mntent.h>
-+#include <sys/types.h>
- #include <scsi/sg.h>
- #include <stdint.h>
- #include <stdio.h>
-
diff --git a/hal-libudev-events.patch b/hal-libudev-events.patch
deleted file mode 100644
index abd13db77af6..000000000000
--- a/hal-libudev-events.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-diff -ru hal-0.5.14/configure.in hal-libudev-events/configure.in
---- hal-0.5.14/configure.in 2012-06-17 17:05:38.346983427 -0700
-+++ hal-libudev-events/configure.in 2012-06-17 12:30:53.406613390 -0700
-@@ -14,6 +14,7 @@
-
- glib_module="glib-2.0 >= 2.10.0 gobject-2.0 > 2.10.0 dbus-glib-1 >= 0.61"
- dbus_module="dbus-1 >= 0.61"
-+udev_module="libudev >= 185"
- blkid_module="blkid >= 2.15"
- volume_id_module="libvolume_id >= 0.77"
- polkit_module="polkit >= 0.5"
-@@ -693,6 +694,11 @@
- AC_SUBST(DBUS_CFLAGS)
- AC_SUBST(DBUS_LIBS)
-
-+# D-Bus libs
-+PKG_CHECK_MODULES(UDEV, [$udev_module])
-+AC_SUBST(UDEV_CFLAGS)
-+AC_SUBST(UDEV_LIBS)
-+
- # glib libs
- PKG_CHECK_MODULES(GLIB, [$glib_module])
- AC_SUBST(GLIB_CFLAGS)
-Only in hal-libudev-events: .configure.in.swp
-diff -ru hal-0.5.14/hald/linux/osspec.c hal-libudev-events/hald/linux/osspec.c
---- hal-0.5.14/hald/linux/osspec.c 2012-06-17 17:05:38.343650094 -0700
-+++ hal-libudev-events/hald/linux/osspec.c 2012-06-17 16:57:08.250305305 -0700
-@@ -44,6 +44,7 @@
- #include <sys/un.h>
- #include <sys/utsname.h>
- #include <unistd.h>
-+#include <libudev.h>
-
- #include <dbus/dbus.h>
- #include <dbus/dbus-glib.h>
-@@ -69,158 +70,97 @@
-
- static gboolean hald_done_synthesizing_coldplug = FALSE;
-
--static gboolean
--hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
-+static long long get_ll_dev_prop(struct udev_device *device, const char *property)
- {
-- int fd;
-- int retval;
-- struct msghdr smsg;
-- struct cmsghdr *cmsg;
-- struct iovec iov;
-- struct ucred *cred;
-- char cred_msg[CMSG_SPACE(sizeof(struct ucred))];
-+ long long result = 0;
-+ const char * propVal = udev_device_get_property_value(device, property);
-
-- char buf[4096];
-- size_t bufpos = 0;
-- const char *action = NULL;
-- HotplugEvent *hotplug_event;
-+ if(propVal != NULL) {
-+ result = strtoull(propVal, NULL, 10);
-+ HAL_INFO(("Property: %s Value: %lli", property, result));
-+ }
-+ return result;
-+}
-
-- memset(buf, 0x00, sizeof (buf));
-+static void copy_dev_prop(struct udev_device *device, char * dst, size_t dst_size, const char *property)
-+{
-+ const char * propVal = udev_device_get_property_value(device, property);
-
-- fd = g_io_channel_unix_get_fd (source);
-+ if(propVal != NULL) {
-+ g_strlcpy (dst, propVal, dst_size);
-+ HAL_INFO(("Property: %s Value: %s", property, dst));
-+ }
-+}
-
-- iov.iov_base = &buf;
-- iov.iov_len = sizeof (buf);
-+static void copy_dev_prop_formatted(struct udev_device *device, char * format, char * dst, size_t dst_size, const char *property)
-+{
-+ const char * propVal = udev_device_get_property_value(device, property);
-
-- memset(&smsg, 0x00, sizeof (struct msghdr));
-- smsg.msg_iov = &iov;
-- smsg.msg_iovlen = 1;
-- smsg.msg_control = cred_msg;
-- smsg.msg_controllen = sizeof (cred_msg);
--
-- retval = recvmsg (fd, &smsg, 0);
-- if (retval < 0) {
-- if (errno != EINTR)
-- HAL_INFO (("Unable to receive message, errno=%d", errno));
-- goto out;
-+ if(propVal != NULL) {
-+ g_snprintf (dst, dst_size, format, propVal);
-+ HAL_INFO(("Property: %s Value: %s", property, dst));
- }
-- cmsg = CMSG_FIRSTHDR (&smsg);
-- cred = (struct ucred *) CMSG_DATA (cmsg);
-+}
-
-- if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) {
-- HAL_INFO (("No sender credentials received, message ignored"));
-- goto out;
-- }
-+static gboolean
-+hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
-+{
-+ struct udev_monitor *udev_monitor = (struct udev_monitor *) user_data;
-+ struct udev_device *device;
-
-- if (cred->uid != 0) {
-- HAL_INFO (("Sender uid=%i, message ignored", cred->uid));
-- goto out;
-- }
-+ char *tmp, *tmp1;
-+
-+ const char *action = NULL;
-+ HotplugEvent *hotplug_event;
-
-- if (!strstr(buf, "@/")) {
-- HAL_INFO (("invalid message format"));
-+ device = udev_monitor_receive_device(udev_monitor);
-+
-+ if (!device) {
-+ HAL_ERROR (("Unable to receive message from udev device"));
- goto out;
- }
-
- hotplug_event = g_slice_new0 (HotplugEvent);
- hotplug_event->type = HOTPLUG_EVENT_SYSFS;
-
-- while (bufpos < sizeof (buf)) {
-- size_t keylen;
-- char *key;
-- char *str, *dstr;
--
-- key = &buf[bufpos];
-- keylen = strlen(key);
-- if (keylen == 0)
-- break;
-- bufpos += keylen + 1;
--
-- if (strncmp(key, "ACTION=", 7) == 0)
-- action = &key[7];
-- else if (strncmp(key, "DEVPATH=", 8) == 0) {
--
-- /* md devices are handled via looking at /proc/mdstat */
-- if (g_str_has_prefix (key + 8, "/block/md")) {
-- HAL_INFO (("skipping md event for %s", key + 8));
-- goto invalid;
-- }
--
-- g_snprintf (hotplug_event->sysfs.sysfs_path, sizeof (hotplug_event->sysfs.sysfs_path),
-- "/sys%s", &key[8]);
-- } else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) {
--
-- /* md devices are handled via looking at /proc/mdstat */
-- if (g_str_has_prefix (key + 12, "/block/md")) {
-- HAL_INFO (("skipping md event for %s", key + 8));
-- goto invalid;
-- }
--
-- g_snprintf (hotplug_event->sysfs.sysfs_path_old, sizeof (hotplug_event->sysfs.sysfs_path_old),
-- "/sys%s", &key[12]);
-- } else if (strncmp(key, "SUBSYSTEM=", 10) == 0)
-- g_strlcpy (hotplug_event->sysfs.subsystem, &key[10], sizeof (hotplug_event->sysfs.subsystem));
-- else if (strncmp(key, "DEVNAME=", 8) == 0)
-- g_strlcpy (hotplug_event->sysfs.device_file, &key[8], sizeof (hotplug_event->sysfs.device_file));
-- else if (strncmp(key, "SEQNUM=", 7) == 0)
-- hotplug_event->sysfs.seqnum = strtoull(&key[7], NULL, 10);
-- else if (strncmp(key, "IFINDEX=", 8) == 0)
-- hotplug_event->sysfs.net_ifindex = strtoul(&key[8], NULL, 10);
-- else if (strncmp(key, "ID_VENDOR=", 10) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[10])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.vendor, str, sizeof(hotplug_event->sysfs.vendor));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_MODEL=", 9) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[9])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.model, str, sizeof(hotplug_event->sysfs.model));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_REVISION=", 12) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[12])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.revision, str, sizeof(hotplug_event->sysfs.revision));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_SERIAL=", 10) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[10])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.serial, str, sizeof(hotplug_event->sysfs.serial));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_FS_USAGE=", 12) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[12])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.fsusage, str, sizeof(hotplug_event->sysfs.fsusage));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_FS_TYPE=", 11) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[11])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.fstype, str, sizeof(hotplug_event->sysfs.fstype));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_FS_VERSION=", 14) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[14])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.fsversion, str, sizeof(hotplug_event->sysfs.fsversion));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_FS_UUID=", 11) == 0) {
-- if ((str = hal_util_strdup_valid_utf8(&key[11])) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.fsuuid, str, sizeof(hotplug_event->sysfs.fsuuid));
-- g_free (str);
-- }
-- } else if (strncmp(key, "ID_FS_LABEL_ENC=", 16) == 0) {
-- dstr = g_malloc0 (keylen - 15);
-- hal_util_decode_escape (&key[16], dstr, sizeof(hotplug_event->sysfs.fslabel));
--
-- if ((str = hal_util_strdup_valid_utf8(dstr)) != NULL ) {
-- g_strlcpy (hotplug_event->sysfs.fslabel, str, sizeof(hotplug_event->sysfs.fslabel));
-- g_free (str);
-- }
-- g_free (dstr);
-- } else if (strncmp(key, "DM_UDEV_DISABLE_OTHER_RULES_FLAG=", 33) == 0) {
-- if (strtoul(&key[33], NULL, 10) == 1) {
-- HAL_INFO (("ignoring device requested by DM udev rules"));
-- goto invalid;
-- }
-+ action = udev_device_get_action(device);
-+
-+ copy_dev_prop_formatted(device, "/sys%s", hotplug_event->sysfs.sysfs_path, sizeof(hotplug_event->sysfs.sysfs_path), "DEVPATH");
-+ copy_dev_prop(device, hotplug_event->sysfs.subsystem, sizeof(hotplug_event->sysfs.subsystem), "SUBSYSTEM");
-+ copy_dev_prop(device, hotplug_event->sysfs.device_file, sizeof(hotplug_event->sysfs.device_file), "DEVNAME");
-+
-+ hotplug_event->sysfs.seqnum = get_ll_dev_prop(device, "SEQNUM");
-+ hotplug_event->sysfs.net_ifindex = get_ll_dev_prop(device, "IFINDEX");
-+
-+ copy_dev_prop_formatted(device, "/sys%s", hotplug_event->sysfs.sysfs_path_old, sizeof(hotplug_event->sysfs.sysfs_path_old), "DEVPATH_OLD");
-+ copy_dev_prop(device, hotplug_event->sysfs.vendor, sizeof(hotplug_event->sysfs.vendor), "ID_VENDOR");
-+ copy_dev_prop(device, hotplug_event->sysfs.model, sizeof(hotplug_event->sysfs.model), "ID_MODEL");
-+ copy_dev_prop(device, hotplug_event->sysfs.revision, sizeof(hotplug_event->sysfs.revision), "ID_REVISION");
-+ copy_dev_prop(device, hotplug_event->sysfs.serial, sizeof(hotplug_event->sysfs.serial), "ID_SERIAL");
-+ copy_dev_prop(device, hotplug_event->sysfs.fsusage, sizeof(hotplug_event->sysfs.fsusage), "ID_FS_USAGE");
-+ copy_dev_prop(device, hotplug_event->sysfs.fstype, sizeof(hotplug_event->sysfs.fstype), "ID_FS_TYPE");
-+ copy_dev_prop(device, hotplug_event->sysfs.fsversion, sizeof(hotplug_event->sysfs.fsversion), "ID_FS_VERSION");
-+ copy_dev_prop(device, hotplug_event->sysfs.fsuuid, sizeof(hotplug_event->sysfs.fsuuid), "ID_FS_UUID");
-+ copy_dev_prop(device, hotplug_event->sysfs.fslabel, sizeof(hotplug_event->sysfs.fslabel), "ID_FS_LABEL_ENC");
-+
-+ /* md devices are handled via looking at /proc/mdstat */
-+ if (g_str_has_prefix (hotplug_event->sysfs.sysfs_path, "/sys/block/md")) {
-+ HAL_INFO (("skipping md event for %s", hotplug_event->sysfs.sysfs_path));
-+ goto invalid;
-+ }
-+ if (g_str_has_prefix (hotplug_event->sysfs.sysfs_path_old, "/sys/block/md")) {
-+ HAL_INFO (("skipping md event for %s", hotplug_event->sysfs.sysfs_path_old));
-+ goto invalid;
-+ }
-+
-+ if(hotplug_event->sysfs.fslabel != NULL) {
-+ tmp = g_malloc(sizeof(hotplug_event->sysfs.fslabel));
-+ hal_util_decode_escape (hotplug_event->sysfs.fslabel, tmp, sizeof(hotplug_event->sysfs.fslabel));
-+ if ((tmp1 = hal_util_strdup_valid_utf8(tmp)) != NULL ) {
-+ g_strlcpy (hotplug_event->sysfs.fslabel, tmp1, sizeof(hotplug_event->sysfs.fslabel));
-+ g_free (tmp1);
- }
-+ g_free(tmp);
- }
-
- if (!action) {
-@@ -291,6 +231,7 @@
- g_slice_free (HotplugEvent, hotplug_event);
-
- out:
-+ udev_device_unref(device);
- return TRUE;
- }
-
-@@ -406,9 +347,9 @@
- void
- osspec_init (void)
- {
-+ struct udev * udev;
-+ struct udev_monitor * udev_monitor;
- int udev_socket;
-- struct sockaddr_un saddr;
-- socklen_t addrlen;
- const int on = 1;
- GIOChannel *udev_channel;
- GIOChannel *mounts_channel;
-@@ -419,28 +360,35 @@
-
- hal_device_store_index_property (hald_get_gdl (), "linux.sysfs_path");
-
-- memset(&saddr, 0x00, sizeof(saddr));
-- saddr.sun_family = AF_LOCAL;
-- /* use abstract namespace for socket path */
-- strcpy(&saddr.sun_path[1], "/org/freedesktop/hal/udev_event");
-- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
-+ udev = udev_new();
-+
-+ if(!udev) {
-+ DIE (("Could not create udev"));
-+ }
-+
-+ udev_monitor = udev_monitor_new_from_netlink(udev, "udev");
-+
-+ if(!udev_monitor || udev_monitor_enable_receiving(udev_monitor)) {
-+ DIE (("Could not create udev monitor"));
-+ }
-+
-+ udev_socket = udev_monitor_get_fd(udev_monitor);
-
-- udev_socket = socket(AF_LOCAL, SOCK_DGRAM, 0);
- if (udev_socket == -1) {
- DIE (("Couldn't open socket"));
- }
-
-- if (bind(udev_socket, (struct sockaddr *) &saddr, addrlen) < 0) {
-- fprintf (stderr, "Error binding udev_event socket: %s\n", strerror(errno));
-- exit (1);
-- }
- /* enable receiving of the sender credentials */
- setsockopt(udev_socket, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
-
- udev_channel = g_io_channel_unix_new (udev_socket);
-- g_io_add_watch (udev_channel, G_IO_IN, hald_udev_data, NULL);
-+ g_io_add_watch (udev_channel, G_IO_IN, hald_udev_data, udev_monitor);
- g_io_channel_unref (udev_channel);
-
-+ /*udev_monitor_unref(udev_monitor);
-+ udev_unref(udev);*/
-+
-+
- /* watch /proc/mounts for mount tree changes
- * kernel 2.6.15 vfs throws a POLLERR event for every change
- */diff -ru hal-0.5.14/hald/Makefile.am hal-libudev-events/hald/Makefile.am
---- hal-0.5.14/hald/Makefile.am 2012-06-17 17:05:38.346983427 -0700
-+++ hal-libudev-events/hald/Makefile.am 2012-06-17 12:41:57.566628300 -0700
-@@ -74,7 +74,7 @@
- hald_SOURCES += ck-tracker.h ck-tracker.c
- endif
-
--hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ @POLKIT_LIBS@ -lm @HALD_OS_LIBS@ $(top_builddir)/hald/$(HALD_BACKEND)/libhald_$(HALD_BACKEND).la
-+hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ @POLKIT_LIBS@ -lm @HALD_OS_LIBS@ $(top_builddir)/hald/$(HALD_BACKEND)/libhald_$(HALD_BACKEND).la @UDEV_LIBS@
-
- #### Init scripts fun
- SCRIPT_IN_FILES=haldaemon.in
diff --git a/hal.patch b/hal.patch
deleted file mode 100644
index 300b48f03f4d..000000000000
--- a/hal.patch
+++ /dev/null
@@ -1,603 +0,0 @@
-diff -u -r hal-0.5.14/configure.in src/hal-0.5.14/configure.in
---- hal-0.5.14/configure.in 2009-08-24 14:42:29.000000000 +0200
-+++ src/hal-0.5.14/configure.in 2011-12-19 20:39:54.000000000 +0100
-@@ -479,9 +479,6 @@
- fi
- AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
-
--USE_LIBUSB20=no
--USE_LIBUSB=no
--LIBUSB20_LIBS=""
- AC_ARG_WITH([backend],
- AS_HELP_STRING([--with-backend=<name>],
- [backend to use (linux/solaris/freebsd/dummy)]),
-@@ -510,21 +507,25 @@
- AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
- AC_SUBST(HALD_BACKEND)
- if test "x$HALD_BACKEND" = "xfreebsd"; then
-- AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
--fi
--if test "x$USE_LIBUSB20" = "xno"; then
-- AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=no])
--fi
--AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"])
--AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"])
--if test "x$USE_LIBUSB20" = "xyes"; then
-- AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
-- LIBUSB20_LIBS="-lusb20"
--elif test "x$USE_LIBUSB" = "xyes"; then
-- AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
-- LIBUSB20_LIBS="-lusb"
-+ USE_BSDLIBUSB20=no
-+ USE_BSDLIBUSB=no
-+ LIBUSB20_LIBS=""
-+ AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_BSDLIBUSB20=yes], [USE_BSDLIBUSB20=no])
-+ if test "x$USE_BSDLIBUSB20" = "xno"; then
-+ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_BSDLIBUSB=yes], [USE_BSDLIBUSB=no])
-+ fi
-+ AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_BSDLIBUSB20" = "xyes" -o "x$USE_BSDLIBUSB" = "xyes"])
-+ if test "x$USE_BSDLIBUSB20" = "xyes"; then
-+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
-+ LIBUSB20_LIBS="-lusb20"
-+ elif test "x$USE_BSDLIBUSB" = "xyes"; then
-+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
-+ LIBUSB20_LIBS="-lusb"
-+ fi
-+ AC_SUBST(LIBUSB20_LIBS)
-+else
-+ AM_CONDITIONAL([HAVE_LIBUSB20], [false])
- fi
--AC_SUBST(LIBUSB20_LIBS)
-
- dnl DBUS API is subject to changes
- AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change])
-diff -u -r hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi src/hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi
---- hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi 2009-06-26 09:28:39.000000000 +0200
-+++ src/hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi 2011-12-19 20:39:54.000000000 +0100
-@@ -2,6 +2,12 @@
- <deviceinfo version="0.2">
- <device>
-
-+ <!-- This KVMS has abs x/y and buttons. It only has inputInfo.joystick
-+ set by hal and doesn't get picked up by default -->
-+ <match key="input.product" contains="American Megatrends Inc. Virtual Keyboard and Mouse">
-+ <merge key="input.x11_driver" type="string">evdev</merge>
-+ </match>
-+
- <!-- KVM emulates a USB graphics tablet which works in absolute coordinate mode -->
- <match key="input.product" contains="QEMU USB Tablet">
- <merge key="input.x11_driver" type="string">evdev</merge>
-@@ -16,6 +22,14 @@
- </match>
- </match>
-
-+ <match key="info.capabilities" contains="input.touchpad">
-+ <merge key="input.x11_driver" type="string">mouse</merge>
-+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
-+ string="Linux">
-+ <merge key="input.x11_driver" type="string">evdev</merge>
-+ </match>
-+ </match>
-+
- <match key="info.capabilities" contains="input.tablet">
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
-@@ -32,5 +46,18 @@
- <merge key="input.x11_driver" type="string">evdev</merge>
- </match>
- </match>
-+
-+ <!-- http://bugs.freedesktop.org/show_bug.cgi?id=22442
-+ Posts accel data through ABS_X/ABS_Y, makes X unusable -->
-+ <match key="info.product" contains="ThinkPad HDAPS accelerometer data">
-+ <remove key="input.x11_driver" />
-+ </match>
-+
-+ <!-- https://bugzilla.redhat.com/show_bug.cgi?id=523914
-+ Mouse does not move in PV Xen guest -->
-+ <match key="info.product" contains="Xen Virtual Pointer">
-+ <merge key="input.x11_options.IgnoreAbsoluteAxes" type="string">false</merge>
-+ <merge key="input.x11_options.IgnoreRelativeAxes" type="string">false</merge>
-+ </match>
- </device>
- </deviceinfo>
-diff -u -r hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi src/hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi
---- hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi 2009-11-05 15:09:01.000000000 +0100
-+++ src/hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi 2011-12-19 20:39:54.000000000 +0100
-@@ -99,6 +99,11 @@
- </match>
- </match>
-
-+ <!-- Hide partitions marked as Compaq Diagnostics -->
-+ <match key="volume.partition.type" string="0x12">
-+ <merge key="volume.ignore" type="bool">true</merge>
-+ </match>
-+
- <!-- EFI firmware partitions -->
- <match key="volume.fstype" string="vfat">
- <match key="volume.label" string="EFI">
-diff -u -r hal-0.5.14/hal.conf.in src/hal-0.5.14/hal.conf.in
---- hal-0.5.14/hal.conf.in 2009-02-04 23:07:23.000000000 +0100
-+++ src/hal-0.5.14/hal.conf.in 2011-12-19 20:39:54.000000000 +0100
-@@ -25,7 +25,41 @@
- send_interface="org.freedesktop.Hal.Device"/>
- <allow send_destination="org.freedesktop.Hal"
- send_interface="org.freedesktop.Hal.Manager"/>
-+ </policy>
-
-+ <!-- Only allow users at the local console to manipulate devices -->
-+ <policy at_console="true">
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.DockStation"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.Leds"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.LightSensor"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.Storage"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.Volume"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
-+ <allow send_destination="org.freedesktop.Hal"
-+ send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
-+
-+ </policy>
-+
-+ <!-- well,...and root too -->
-+ <policy user="root">
- <allow send_destination="org.freedesktop.Hal"
- send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
- <allow send_destination="org.freedesktop.Hal"
-diff -u -r hal-0.5.14/hald/linux/addons/addon-imac-backlight.c src/hal-0.5.14/hald/linux/addons/addon-imac-backlight.c
---- hal-0.5.14/hald/linux/addons/addon-imac-backlight.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/addons/addon-imac-backlight.c 2011-12-19 20:39:54.000000000 +0100
-@@ -158,7 +158,8 @@
- goto out;
- }
-
-- if (ioperm(0xB2, 0xB3, 1) < 0)
-+ /* Allow access to ports 0xB2 and 0xB3 */
-+ if (ioperm(0xB2, 2, 1) < 0)
- {
- HAL_ERROR (("ioperm failed (you should be root)."));
- exit(1);
-diff -u -r hal-0.5.14/hald/linux/addons/addon-macbookpro-backlight.c src/hal-0.5.14/hald/linux/addons/addon-macbookpro-backlight.c
---- hal-0.5.14/hald/linux/addons/addon-macbookpro-backlight.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/addons/addon-macbookpro-backlight.c 2011-12-19 20:39:54.000000000 +0100
-@@ -507,7 +507,8 @@
- state = INREG(0x7ae4);
- OUTREG(0x7ae4, state);
-
-- if (ioperm (0x300, 0x304, 1) < 0) {
-+ /* Allow access to porta 0x300 through 0x304 */
-+ if (ioperm (0x300, 5, 1) < 0) {
- HAL_ERROR (("ioperm failed (you should be root)."));
- exit(1);
- }
-diff -u -r hal-0.5.14/hald/linux/osspec.c src/hal-0.5.14/hald/linux/osspec.c
---- hal-0.5.14/hald/linux/osspec.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/osspec.c 2011-12-19 20:39:54.000000000 +0100
-@@ -215,6 +215,11 @@
- g_free (str);
- }
- g_free (dstr);
-+ } else if (strncmp(key, "DM_UDEV_DISABLE_OTHER_RULES_FLAG=", 33) == 0) {
-+ if (strtoul(&key[33], NULL, 10) == 1) {
-+ HAL_INFO (("ignoring device requested by DM udev rules"));
-+ goto invalid;
-+ }
- }
- }
-
-diff -u -r hal-0.5.14/hald/linux/probing/probe-hiddev.c src/hal-0.5.14/hald/linux/probing/probe-hiddev.c
---- hal-0.5.14/hald/linux/probing/probe-hiddev.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-hiddev.c 2011-12-19 20:39:54.000000000 +0100
-@@ -57,11 +57,12 @@
- /* assume failure */
- ret = 1;
-
-+ dbus_error_init (&error);
-+
- udi = getenv ("UDI");
- if (udi == NULL)
- goto out;
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
- goto out;
-
-diff -u -r hal-0.5.14/hald/linux/probing/probe-ieee1394-unit.c src/hal-0.5.14/hald/linux/probing/probe-ieee1394-unit.c
---- hal-0.5.14/hald/linux/probing/probe-ieee1394-unit.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-ieee1394-unit.c 2011-12-19 20:39:54.000000000 +0100
-@@ -388,6 +388,8 @@
-
- setup_logger ();
-
-+ dbus_error_init (&error);
-+
- udi = getenv ("UDI");
- if (udi == NULL)
- goto out;
-@@ -396,7 +398,6 @@
- if (ieee1394_udi == NULL)
- goto out;
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
- goto out;
-
-diff -u -r hal-0.5.14/hald/linux/probing/probe-input.c src/hal-0.5.14/hald/linux/probing/probe-input.c
---- hal-0.5.14/hald/linux/probing/probe-input.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-input.c 2011-12-19 20:39:54.000000000 +0100
-@@ -70,6 +70,7 @@
- fd = -1;
-
- setup_logger ();
-+ dbus_error_init (&error);
-
- button_type = getenv ("HAL_PROP_BUTTON_TYPE");
- if (button_type == NULL)
-@@ -96,7 +97,6 @@
- if (udi == NULL)
- goto out;
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
- goto out;
-
-diff -u -r hal-0.5.14/hald/linux/probing/probe-net-bluetooth.c src/hal-0.5.14/hald/linux/probing/probe-net-bluetooth.c
---- hal-0.5.14/hald/linux/probing/probe-net-bluetooth.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-net-bluetooth.c 2011-12-19 20:39:54.000000000 +0100
-@@ -141,6 +141,8 @@
- DBusMessage *reply = NULL;
- DBusError error;
-
-+ dbus_error_init (&error);
-+
- udi = getenv ("UDI");
- if (udi == NULL)
- goto out;
-@@ -151,8 +153,6 @@
-
- HAL_INFO (("Investigating '%s'", iface));
-
-- dbus_error_init (&error);
--
- if ((conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error)) == NULL)
- goto out;
-
-diff -u -r hal-0.5.14/hald/linux/probing/probe-printer.c src/hal-0.5.14/hald/linux/probing/probe-printer.c
---- hal-0.5.14/hald/linux/probing/probe-printer.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-printer.c 2011-12-19 20:39:54.000000000 +0100
-@@ -66,6 +66,8 @@
- ret = 1;
-
- setup_logger ();
-+
-+ dbus_error_init (&error);
-
- udi = getenv ("UDI");
- if (udi == NULL) {
-@@ -73,7 +75,6 @@
- goto out;
- }
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
- HAL_ERROR (("ctx init failed"));
- goto out;
-diff -u -r hal-0.5.14/hald/linux/probing/probe-smbios.c src/hal-0.5.14/hald/linux/probing/probe-smbios.c
---- hal-0.5.14/hald/linux/probing/probe-smbios.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-smbios.c 2011-12-19 20:39:54.000000000 +0100
-@@ -129,6 +129,8 @@
- ret = 1;
-
- setup_logger ();
-+
-+ dbus_error_init (&error);
-
- udi = getenv ("UDI");
- if (udi == NULL) {
-@@ -136,7 +138,6 @@
- goto out;
- }
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
- HAL_ERROR (("ctx init failed"));
- goto out;
-diff -u -r hal-0.5.14/hald/linux/probing/probe-storage.c src/hal-0.5.14/hald/linux/probing/probe-storage.c
---- hal-0.5.14/hald/linux/probing/probe-storage.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-storage.c 2011-12-19 20:39:54.000000000 +0100
-@@ -109,6 +109,8 @@
- /* assume failure */
- ret = 1;
-
-+ dbus_error_init (&error);
-+
- if ((udi = getenv ("UDI")) == NULL)
- goto out;
- if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
-@@ -127,7 +129,6 @@
- else
- only_check_for_fs = FALSE;
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
- goto out;
-
-diff -u -r hal-0.5.14/hald/linux/probing/probe-video4linux.c src/hal-0.5.14/hald/linux/probing/probe-video4linux.c
---- hal-0.5.14/hald/linux/probing/probe-video4linux.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-video4linux.c 2011-12-19 20:44:20.000000000 +0100
-@@ -30,7 +30,7 @@
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/ioctl.h>
--#include <linux/videodev.h>
-+#include <libv4l1-videodev.h>
- #include <linux/videodev2.h>
- #include <errno.h>
- #include <fcntl.h>
-@@ -58,6 +58,8 @@
-
- setup_logger ();
-
-+ dbus_error_init (&error);
-+
- device_file = getenv ("HAL_PROP_VIDEO4LINUX_DEVICE");
- if (device_file == NULL)
- goto out;
-@@ -66,7 +68,6 @@
- if (udi == NULL)
- goto out;
-
-- dbus_error_init (&error);
- ctx = libhal_ctx_init_direct (&error);
- if (ctx == NULL)
- goto out;
-diff -u -r hal-0.5.14/hald/linux/probing/probe-volume.c src/hal-0.5.14/hald/linux/probing/probe-volume.c
---- hal-0.5.14/hald/linux/probing/probe-volume.c 2009-08-24 14:42:30.000000000 +0200
-+++ src/hal-0.5.14/hald/linux/probing/probe-volume.c 2011-12-19 20:39:54.000000000 +0100
-@@ -318,6 +318,8 @@
- /* assume failure */
- ret = 1;
-
-+ dbus_error_init (&error);
-+
- if ((udi = getenv ("UDI")) == NULL)
- goto out;
- if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
-@@ -346,7 +348,6 @@
-
- fsusage = getenv ("HAL_PROP_VOLUME_FSUSAGE");
-
-- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
- goto out;
-
-diff -u -r hal-0.5.14/hald/util.h src/hal-0.5.14/hald/util.h
---- hal-0.5.14/hald/util.h 2009-04-03 16:31:34.000000000 +0200
-+++ src/hal-0.5.14/hald/util.h 2011-12-19 20:39:54.000000000 +0100
-@@ -38,7 +38,7 @@
- #endif
-
- #define HAL_NAME_MAX 256
--#define HAL_PATH_MAX 512
-+#define HAL_PATH_MAX 4096
-
- gboolean hal_util_remove_trailing_slash (gchar *path);
-
-diff -u -r hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux src/hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux
---- hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux 2008-11-10 11:14:12.000000000 +0100
-+++ src/hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux 2011-12-19 20:39:54.000000000 +0100
-@@ -8,11 +8,6 @@
- # the Free Software Foundation; either version 2 of the License, or
- # (at your option) any later version.
-
--DELL_WCTL=/usr/bin/dellWirelessCtl
--if [ -x "/usr/sbin/dellWirelessCtl" ]; then
-- DELL_WCTL=/usr/sbin/dellWirelessCtl
--fi
--
- if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
- value="`hal-system-sonypic getbluetooth`"
-@@ -22,25 +17,6 @@
- exit 1
- fi
- exit ${value}
-- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
-- if [ -x "$DELL_WCTL" ]; then
-- # TODO: write our own binary that links with libsmbios?
-- $DELL_WCTL --st_bt
-- value=$?
-- if [ "$value" = "0" ]; then
-- exit 1
-- elif [ "$value" = "1" ]; then
-- exit 0
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl returned $value" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
-- exit 1
-- fi
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -r "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
- read value < $HAL_PROP_LINUX_SYSFS_PATH 2> /dev/null
- if [ $? -eq 0 ]; then
-@@ -53,56 +29,6 @@
- else
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
- echo "Access type not supported" >&2
-- exit 1
-- fi
--elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
-- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
-- if [ -x "$DELL_WCTL" ]; then
-- # TODO: write our own binary that links with libsmbios?
-- $DELL_WCTL --st_wlan
-- value=$?
-- if [ "$value" = "0" ]; then
-- exit 1
-- elif [ "$value" = "1" ]; then
-- exit 0
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl returned $value" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "Access type not supported" >&2
-- exit 1
-- fi
--elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
-- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
-- if [ -x "$DELL_WCTL" ]; then
-- # TODO: write our own binary that links with libsmbios?
-- $DELL_WCTL --st_wwan
-- value=$?
-- if [ "$value" = "0" ]; then
-- exit 1
-- elif [ "$value" = "1" ]; then
-- exit 0
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl returned $value" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "Access type not supported" >&2
- exit 1
- fi
- else
-diff -u -r hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux src/hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux
---- hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux 2008-11-10 11:14:12.000000000 +0100
-+++ src/hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux 2011-12-19 20:39:54.000000000 +0100
-@@ -8,11 +8,6 @@
- # the Free Software Foundation; either version 2 of the License, or
- # (at your option) any later version.
-
--DELL_WCTL=/usr/bin/dellWirelessCtl
--if [ -x "/usr/sbin/dellWirelessCtl" ]; then
-- DELL_WCTL=/usr/sbin/dellWirelessCtl
--fi
--
- if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
- hal-system-sonypic setbluetooth $value
-@@ -23,26 +18,6 @@
- exit 1
- fi
- exit 0
-- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
-- if [ -x "$DELL_WCTL" ]; then
-- # TODO: write our own binary that links with libsmbios?
-- if [ "$value" = "true" ]; then
-- $DELL_WCTL --bt 1
-- ret=$?
-- else
-- $DELL_WCTL --bt 0
-- ret=$?
-- fi
-- if [ "$ret" != "0" ]; then
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl returned $ret" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
-- exit 1
-- fi
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -w "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
- if [ "$value" = "true" ]; then
- bit=1;
-@@ -59,60 +34,6 @@
- else
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
- echo "Access type not supported" >&2
-- exit 1
-- fi
--elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
-- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
-- if [ -x "$DELL_WCTL" ]; then
-- # As a side effect we disable the physical kill switch
-- # TODO: write our own binary that links with libsmbios?
-- if [ "$value" = "true" ]; then
-- $DELL_WCTL --sw_wlan 0 --wlan 1
-- ret=$?
-- else
-- $DELL_WCTL --sw_wlan 0 --wlan 0
-- ret=$?
-- fi
-- if [ "$ret" != "0" ]; then
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl returned $ret" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "Access type not supported" >&2
-- exit 1
-- fi
--elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
-- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
-- if [ -x "$DELL_WCTL" ]; then
-- # As a side effect we disable the physical kill switch
-- # TODO: write our own binary that links with libsmbios?
-- if [ "$value" = "true" ]; then
-- $DELL_WCTL --sw_wwan 0 --wwan 1
-- ret=$?
-- else
-- $DELL_WCTL --sw_wwan 0 --wwan 0
-- ret=$?
-- fi
-- if [ "$ret" != "0" ]; then
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl returned $ret" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
-- exit 1
-- fi
-- else
-- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
-- echo "Access type not supported" >&2
- exit 1
- fi
- else
diff --git a/hald b/hald
deleted file mode 100644
index 3d016edbdbfe..000000000000
--- a/hald
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-# general config
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- #Check for running dbus, start when not running
- ck_daemon dbus && /etc/rc.d/dbus start
- if [ -x /etc/rc.d/acpid ]; then
- ck_daemon acpid && /etc/rc.d/acpid start
- fi
- stat_busy "Starting Hardware Abstraction Layer"
- if [ ! -x /var/cache/hald ] ; then
- install -m755 -g 82 -o 82 -d /var/cache/hald
- fi
- if [ ! -x /var/run/hald ]; then
- install -m755 -g 82 -o 82 -d /var/run/hald
- fi
- if [ ! -x /var/run/hald/hald-local ]; then
- install -m755 -g 0 -o 0 -d /var/run/hald/hald-local
- fi
- if [ ! -x /var/run/hald/hald-runner ]; then
- install -m755 -g 0 -o 0 -d /var/run/hald/hald-runner
- fi
- /usr/sbin/hald
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon hald
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping Hardware Abstraction Layer"
- [ -f /var/run/hald.pid ] && kill `cat /var/run/hald.pid` &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon hald
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
- ;;
-esac
-exit 0
diff --git a/udev-update.patch b/udev-update.patch
deleted file mode 100644
index f2ca5977a7ed..000000000000
--- a/udev-update.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -ur hal-0.5.14_origin/hald/linux/blockdev.c hal-0.5.14/hald/linux/blockdev.c
---- hal-0.5.14_origin/hald/linux/blockdev.c 2012-02-15 01:44:51.000000000 +0100
-+++ hal-0.5.14/hald/linux/blockdev.c 2012-02-15 01:45:12.000000000 +0100
-@@ -1864,7 +1864,7 @@
- char *ret;
- char *u_stdout;
- int u_exit_status;
-- const char *argv[] = {"/sbin/udevadm", "info", "--root", "--query", "name", "--path", NULL, NULL};
-+ const char *argv[] = {"/usr/bin/udevadm", "info", "--root", "--query", "name", "--path", NULL, NULL};
- GError *g_error;
-
- ret = NULL;
-diff -ur hal-0.5.14_origin/hald/linux/coldplug.c hal-0.5.14/hald/linux/coldplug.c
---- hal-0.5.14_origin/hald/linux/coldplug.c 2012-02-15 01:44:51.000000000 +0100
-+++ hal-0.5.14/hald/linux/coldplug.c 2012-07-16 20:59:15.880478378 -0700
-@@ -154,8 +154,7 @@
- static gboolean
- hal_util_init_sysfs_to_udev_map (void)
- {
-- char *udevdb_export_argv[] = { "/sbin/udevadm", "info", "-e", NULL };
-- char *udevroot_argv[] = { "/sbin/udevadm", "info", "-r", NULL };
-+ char *udevdb_export_argv[] = { "/usr/bin/udevadm", "info", "-e", NULL };
- int udevinfo_exitcode;
- UdevInfo *info = NULL;
- char *p;
-@@ -163,26 +162,9 @@
-
- sysfs_to_udev_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, udev_info_free);
-
-- /* get udevroot */
-- if (g_spawn_sync ("/", udevroot_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, 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;
-- }
--
-- g_strlcpy(dev_root, udevinfo_stdout, sizeof(dev_root));
-- p = strchr(dev_root, '\n');
-- if (p != NULL)
-- p[0] = '\0';
-- g_free(udevinfo_stdout);
-- HAL_INFO (("dev_root is %s", dev_root));
-+ /* get udevroot - hardcode to /dev to fix udevadm commit
-+ * http://cgit.freedesktop.org/systemd/systemd/commit/?id=4f5d327a49e1a40ae0a3b8f1855dc90f3c0d953f */
-+ g_strlcpy(dev_root, "/dev", sizeof(dev_root));
-
- /* get udevdb export */
- if (g_spawn_sync ("/", udevdb_export_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL,