[arch-commits] Commit in hal/trunk (PKGBUILD hal-ignore-internal-dm-devices.patch)

Jan de Groot jgc at archlinux.org
Mon Jan 10 05:53:12 EST 2011


    Date: Monday, January 10, 2011 @ 05:53:12
  Author: jgc
Revision: 105528

upgpkg: hal 0.5.14-6
Ignore internal DM devices

Added:
  hal/trunk/hal-ignore-internal-dm-devices.patch
Modified:
  hal/trunk/PKGBUILD

--------------------------------------+
 PKGBUILD                             |   51 +++++++++++++++++----------------
 hal-ignore-internal-dm-devices.patch |   43 +++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-10 10:25:55 UTC (rev 105527)
+++ PKGBUILD	2011-01-10 10:53:12 UTC (rev 105528)
@@ -4,7 +4,7 @@
 
 pkgname=hal
 pkgver=0.5.14
-pkgrel=5
+pkgrel=6
 pkgdesc="Hardware Abstraction Layer"
 arch=(i686 x86_64)
 license=('GPL' 'custom')
@@ -25,7 +25,8 @@
         dbus-error-init.patch
         path-max.patch
         handle-input-touchpad.patch
-        macbook-fix-ioperm.patch)
+        macbook-fix-ioperm.patch
+        hal-ignore-internal-dm-devices.patch)
 md5sums=('e9163df591a6f38f59fdbfe33e73bf20'
          '277e96ac130d7bfce0b30f0b80db8782'
          '4d4b6801a1cedca22b8bdd9db73b16fb'
@@ -38,26 +39,28 @@
          '634f4ec2203eff7de8fa2ed2c6b9cbe0'
          'f8c9b3a40d03907b498feef571d42466'
          '0575677614db0632b17b1a719798c7e0'
-         '46a5db3ff896ee37762aa8d7e70942c4')
+         '46a5db3ff896ee37762aa8d7e70942c4'
+         '17bc2b911f245cef4a1d98769d5c4d14')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  patch -Np1 -i "${srcdir}/hal-0.5.9-hide-diagnostic.patch" || return 1
-  patch -Np1 -i "${srcdir}/hal-remove-dell-killswitch.patch" || return 1
-  patch -Np1 -i "${srcdir}/hal-KVM-evdev.patch" || return 1
-  patch -Np1 -i "${srcdir}/hal-HDAPS-blacklist.patch" || return 1
-  patch -Np1 -i "${srcdir}/hal-xen-unignore-axes.patch" || return 1
-  patch -Np1 -i "${srcdir}/hal-use-at-console.patch" || return 1
-  patch -Np1 -i "${srcdir}/fix-libusb-detection.patch" || return 1
-  patch -Np1 -i "${srcdir}/dbus-error-init.patch" || return 1
-  patch -Np1 -i "${srcdir}/path-max.patch" || return 1
-  patch -Np1 -i "${srcdir}/handle-input-touchpad.patch" || return 1
-  patch -Np1 -i "${srcdir}/macbook-fix-ioperm.patch" || return 1
+  patch -Np1 -i "${srcdir}/hal-0.5.9-hide-diagnostic.patch"
+  patch -Np1 -i "${srcdir}/hal-remove-dell-killswitch.patch"
+  patch -Np1 -i "${srcdir}/hal-KVM-evdev.patch"
+  patch -Np1 -i "${srcdir}/hal-HDAPS-blacklist.patch"
+  patch -Np1 -i "${srcdir}/hal-xen-unignore-axes.patch"
+  patch -Np1 -i "${srcdir}/hal-use-at-console.patch"
+  patch -Np1 -i "${srcdir}/fix-libusb-detection.patch"
+  patch -Np1 -i "${srcdir}/dbus-error-init.patch"
+  patch -Np1 -i "${srcdir}/path-max.patch"
+  patch -Np1 -i "${srcdir}/handle-input-touchpad.patch"
+  patch -Np1 -i "${srcdir}/macbook-fix-ioperm.patch"
+  patch -Np1 -i "${srcdir}/hal-ignore-internal-dm-devices.patch"
   
-  libtoolize --force || return 1
-  aclocal || return 1
-  autoconf || return 1
-  automake || return 1
+  libtoolize --force
+  aclocal
+  autoconf
+  automake
 
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
       --libexecdir=/usr/lib/hal --with-udev-prefix=/etc \
@@ -67,15 +70,15 @@
       --enable-umount-helper --disable-smbios \
       --with-hal-user=hal --with-hal-group=hal \
       --with-pid-file=/var/run/hald.pid \
-      --disable-gtk-doc || return 1
-  make || return 1
-  make DESTDIR="${pkgdir}" install || return 1
+      --disable-gtk-doc
+  make
+  make DESTDIR="${pkgdir}" install
   install -m755 -d "${pkgdir}/etc/rc.d"
-  install -m755 -d "${pkgdir}/media" || return 1
-  install -m755 "${srcdir}/hal" "${pkgdir}/etc/rc.d/" || return 1
+  install -m755 -d "${pkgdir}/media"
+  install -m755 "${srcdir}/hal" "${pkgdir}/etc/rc.d/"
 
   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
   
   # Fix udev rule location
   install -d -m755 "${pkgdir}/lib"

Added: hal-ignore-internal-dm-devices.patch
===================================================================
--- hal-ignore-internal-dm-devices.patch	                        (rev 0)
+++ hal-ignore-internal-dm-devices.patch	2011-01-10 10:53:12 UTC (rev 105528)
@@ -0,0 +1,43 @@
+From 6f16321da13f6a7cbd9c424ddba2e727e434fa25 Mon Sep 17 00:00:00 2001
+From: Milan Broz <mbroz at redhat.com>
+Date: Tue, 13 Jul 2010 14:07:32 +0000
+Subject: HAL: Ignore internal DM devices with new DM udev rules
+
+With new device-mapper udev rules are /dev/mapper/* symlinks
+to basic device name /dev/dm-X.
+(Change requested by udev upstream.)
+
+This change breaks temporary-cryptsetup workaround inside hal.
+
+With new dm-udev rules (uncluded since device-mapper 1.02.39)
+there is DM_UDEV_DISABLE_OTHER_RULES_FLAG variable
+which controls that scan should be ignored for this device
+(it is set for all internal devices, including temporary cryptsetup,
+internal parts of lvm devices etc.)
+
+Ignore device if this flag is set.
+
+See bugs
+https://bugzilla.redhat.com/show_bug.cgi?id=613909
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286
+
+Signed-off-by: Milan Broz <mbroz at redhat.com>
+---
+diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
+index a8233fd..6d616bc 100644
+--- a/hald/linux/osspec.c
++++ b/hald/linux/osspec.c
+@@ -215,6 +215,11 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
+ 				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;
++			}
+ 		}
+ 	}
+ 
+--
+cgit v0.8.3-6-g21f6



More information about the arch-commits mailing list