diff --git a/0001-Bug-24885-LVM-LVs-now-have-NOPOLICY-0.patch b/0001-Bug-24885-LVM-LVs-now-have-NOPOLICY-0.patch new file mode 100644 index 0000000..3245735 --- /dev/null +++ b/0001-Bug-24885-LVM-LVs-now-have-NOPOLICY-0.patch @@ -0,0 +1,58 @@ +From 351618d08270a0832db3c282082207e6dfa24845 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 3 Nov 2009 21:50:25 +0100 +Subject: [PATCH] =?UTF-8?q?Bug=2024885=20=E2=80=94=20LVM=20LVs=20now=20have=20NOPOLICY=3D0?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit a95d3 caused the NOPOLICY rules get cut short for LVs. Move the NOPOLICY +check close to the top, since its (1) very cheap, and (2) very generic, i. e. +rules further down might want to tweak it for special cases. + +Signed-off-by: David Zeuthen +--- + data/95-devkit-disks.rules | 21 +++++++++++---------- + 1 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/data/95-devkit-disks.rules b/data/95-devkit-disks.rules +index cff8277..7f210ad 100644 +--- a/data/95-devkit-disks.rules ++++ b/data/95-devkit-disks.rules +@@ -6,6 +6,17 @@ ACTION!="add|change", GOTO="devkit_disks_end" + SUBSYSTEM!="block", GOTO="devkit_disks_end" + KERNEL=="loop*|ram*", GOTO="devkit_disks_end" + ++# Mark devices that shouldn't be automounted / autoassembled etc. ++# ++# Deny all, then punch holes for what looks like physical drives ++# (TODO: this heuristic might need some work) ++# ++ ++ENV{DKD_PRESENTATION_NOPOLICY}="1" ++KERNEL=="sd*|hd*|sr*|mmcblk*|mspblk*", ENV{DKD_PRESENTATION_NOPOLICY}="0" ++ ++############################################################################################################## ++ + # we only care about change events on device-mapper + # devices - never touch the device on add events + KERNEL=="dm-*", ACTION!="change", GOTO="devkit_disks_end" +@@ -152,15 +163,5 @@ ENV{ID_FS_TYPE}=="ntfs|vfat", \ + + ############################################################################################################## + +-# Mark devices that shouldn't be automounted / autoassembled etc. +-# +-# Deny all, then punch holes for what looks like physical drives +-# (TODO: this heuristic might need some work) +-# +- +-ENV{DKD_PRESENTATION_NOPOLICY}="1" +-KERNEL=="sd*|hd*|sr*|mmcblk*|mspblk*", ENV{DKD_PRESENTATION_NOPOLICY}="0" +- +-############################################################################################################## + + LABEL="devkit_disks_end" +-- +1.6.5.1 + diff --git a/DeviceKit-disks.spec b/DeviceKit-disks.spec index 0acb7b6..e30ef99 100644 --- a/DeviceKit-disks.spec +++ b/DeviceKit-disks.spec @@ -12,7 +12,7 @@ Summary: Disk Management Service Name: DeviceKit-disks Version: 009 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/ @@ -56,6 +56,7 @@ Requires: ntfsprogs %endif Patch0: 0001-Update-udev-rules-to-cope-better-with-device-mapper.patch +Patch1: 0001-Bug-24885-LVM-LVs-now-have-NOPOLICY-0.patch # for /proc/self/mountinfo, only available in 2.6.26 or higher Conflicts: kernel < 2.6.26 @@ -77,6 +78,7 @@ D-Bus interface definitions for DeviceKit-disks. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %configure --enable-gtk-doc @@ -143,6 +145,9 @@ rm -rf $RPM_BUILD_ROOT # Note: please don't forget the %{?dist} in the changelog. Thanks %changelog +* Tue Nov 03 2009 David Zeuthen - 009-3%{?dist} +- Avoid automounting LVM LVs (fdobz #24885, rhbz #528909) + * Tue Nov 03 2009 David Zeuthen - 009-2%{?dist} - Update udev rules to better cope with device-mapper (#528909)