[arch-commits] Commit in lvm2/repos (3 files)

Thomas Bächler thomas at archlinux.org
Fri Nov 6 18:44:51 EST 2009


    Date: Friday, November 6, 2009 @ 18:44:50
  Author: thomas
Revision: 58299

Merged revisions 58211,58298 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/lvm2/trunk

........
  r58211 | thomas | 2009-11-06 00:54:13 +0100 (Fr, 06 Nov 2009) | 2 lines
  
  Move to upstream udev rules for device-mapper. This requires changes to initscripts to set the STARTUP environment variable during udev trigger.
........
  r58298 | thomas | 2009-11-07 00:41:41 +0100 (Sa, 07 Nov 2009) | 2 lines
  
  Add the necessary patch for the dm rules, received from upstream developers
........

Added:
  lvm2/repos/testing-i686/dm-rules-remove-last_rule.patch
    (from rev 58298, lvm2/trunk/dm-rules-remove-last_rule.patch)
Modified:
  lvm2/repos/testing-i686/	(properties)
  lvm2/repos/testing-i686/PKGBUILD

---------------------------------+
 PKGBUILD                        |   36 +++++++++++++------
 dm-rules-remove-last_rule.patch |   69 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+), 11 deletions(-)


Property changes on: lvm2/repos/testing-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /lvm2/trunk:1-57576
   + /lvm2/trunk:1-58298

Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2009-11-06 23:41:41 UTC (rev 58298)
+++ testing-i686/PKGBUILD	2009-11-06 23:44:50 UTC (rev 58299)
@@ -6,23 +6,31 @@
 pkgver=2.02.54
 _pkgverdm=1.02.39
 _pkgverlvm=${pkgver}
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://sourceware.org/lvm2/"
 license=('GPL')
 groups=('base')
-source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${_pkgverlvm}.tgz \
-        lvm2_install lvm2_hook device-mapper.rules)
-md5sums=('6a33416469652b01aa48cefbe9cac8c1' '40dccdb1044f00fc1e29ca549933d4bd'\
-         'd6f3ca901747c386aa0d842e9ea64413' '065f32a36947e6183722ed9aef13dc0c')
-sha1sums=('794fd5078f7f96eeb1ff1b9ddc47e37a13e8a75d' '86358b3360373dcd1d7e1bf009fe6e6d0c70cdc3'\
-         '0c2a367f2217e6363e5e80257cbc7730d3841e42' '003f5cf654503dcc9c1ba7c11c7d6e77bf27bb8d')
+source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${_pkgverlvm}.tgz
+        lvm2_install
+        lvm2_hook
+        dm-rules-remove-last_rule.patch)
+md5sums=('6a33416469652b01aa48cefbe9cac8c1'
+         '40dccdb1044f00fc1e29ca549933d4bd'
+         'd6f3ca901747c386aa0d842e9ea64413'
+         'ffd137d13f7683dc3f60004c8d2f9ced')
+sha1sums=('794fd5078f7f96eeb1ff1b9ddc47e37a13e8a75d'
+          '86358b3360373dcd1d7e1bf009fe6e6d0c70cdc3'
+          '0c2a367f2217e6363e5e80257cbc7730d3841e42'
+          '0af2a71ae2593cf312e7c4b07593d566d61a4c60')
 
 build() {
   cd "${srcdir}/LVM2.${_pkgverlvm}"
+  patch -p1 -i "${srcdir}/dm-rules-remove-last_rule.patch" || return 1
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-readline \
     --enable-pkgconfig --enable-static_link --with-staticdir=/sbin \
-    --enable-dmeventd --enable-cmdlib || return 1
+    --enable-dmeventd --enable-cmdlib \
+    --with-udevdir=/lib/udev/rules.d/ || return 1
   make || return 1
 }
 
@@ -39,8 +47,10 @@
   install -D -m644 libdm/ioctl/libdevmapper.a "${pkgdir}/usr/lib/libdevmapper.a" || return 1
   rm "${pkgdir}"/lib/libdevmapper-event.a*
   install -D -m644 daemons/dmeventd/libdevmapper-event.a "${pkgdir}/usr/lib/libdevmapper-event.a" || return 1
-  # install udev rule
-  install -D -m644 "${srcdir}/device-mapper.rules" "${pkgdir}/lib/udev/rules.d/device-mapper.rules" || return 1
+  # install udev rules
+  cd udev
+  make DESTDIR="${pkgdir}" install_device-mapper || return 1
+  cd ..
   # fix device-mapper link bug
   ln -sf /lib/libdevmapper.so "${pkgdir}/usr/lib/libdevmapper.so" || return 1
 }
@@ -57,7 +67,11 @@
   rm "${pkgdir}"/usr/lib/liblvm2cmd.a*
   install -D -m644 tools/liblvm2cmd.a "${pkgdir}/usr/lib/liblvm2cmd.a" || return 1
   install -d "${pkgdir}"/etc/lvm/{archive,backup} || return 1
-  # add hook
+  # install udev rules
+  cd udev
+  make DESTDIR="${pkgdir}" install_lvm2 || return 1
+  cd ..
+  # mkinitcpio hook
   install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/lib/initcpio/hooks/lvm2" || return 1
   install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/lib/initcpio/install/lvm2" || return 1
 }

Copied: lvm2/repos/testing-i686/dm-rules-remove-last_rule.patch (from rev 58298, lvm2/trunk/dm-rules-remove-last_rule.patch)
===================================================================
--- testing-i686/dm-rules-remove-last_rule.patch	                        (rev 0)
+++ testing-i686/dm-rules-remove-last_rule.patch	2009-11-06 23:44:50 UTC (rev 58299)
@@ -0,0 +1,69 @@
+diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
+index 9c2e256..aba0bf4 100644
+--- a/udev/10-dm.rules.in
++++ b/udev/10-dm.rules.in
+@@ -1,3 +1,7 @@
++# Copyright (C) 2009 Red Hat, Inc. All rights reserved.
++#
++# This file is part of LVM2.
++
+ # Udev rules for device-mapper devices.
+ #
+ # These rules create a DM control node in /dev/(DM_DIR) directory.
+diff --git a/udev/11-dm-lvm.rules b/udev/11-dm-lvm.rules
+index 0dd6167..d7398fe 100644
+--- a/udev/11-dm-lvm.rules
++++ b/udev/11-dm-lvm.rules
+@@ -22,9 +22,14 @@ ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
+ IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"
+ 
+ # Do not create symlinks for inappropriate subdevices.
+-ENV{DM_LV_NAME}=="?*_mimage_[0-9]*|pvmove?*|?*_vorigin", GOTO="lvm_end"
++ENV{DM_LV_NAME}=="?*_mimage_[0-9]*|pvmove?*|?*_vorigin", GOTO="lvm_disable"
++ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
+ 
+ # Create symlinks for top-level devices only.
+-ENV{DM_VG_NAME}=="?*", ENV{DM_LV_NAME}=="?*", ENV{DM_LV_LAYER}!="?*", SYMLINK+="$env{DM_VG_NAME}/$env{DM_LV_NAME}"
++ENV{DM_VG_NAME}=="?*", ENV{DM_LV_NAME}=="?*", SYMLINK+="$env{DM_VG_NAME}/$env{DM_LV_NAME}", GOTO="lvm_end"
++
++LABEL="lvm_disable"
++ENV{DM_UDEV_DISABLE_DISK_RULES}="1"
++ENV{DM_UDEV_DISABLE_OTHER_RULES}="1"
+ 
+ LABEL="lvm_end"
+diff --git a/udev/13-dm-disk.rules b/udev/13-dm-disk.rules
+index 03d9cbc..271ca22 100644
+--- a/udev/13-dm-disk.rules
++++ b/udev/13-dm-disk.rules
+@@ -10,27 +10,18 @@
+ # suspended.
+ 
+ # "add" event is processed on coldplug only!
+-ACTION!="add|change", GOTO="dm_other"
+-ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_other"
+-ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_other"
++ACTION!="add|change", GOTO="dm_end"
++ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
++ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end"
+ 
+ SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
+ ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
+ 
+-ENV{DM_SUSPENDED}=="1", GOTO="dm_other"
++ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
+ 
+ IMPORT{program}="$env{DM_SBIN_PATH}/blkid -o udev -p $tempnode"
+ ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
+ ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+ 
+-# Cutoff all subsequent rules if instructed by a flag.
+-# This flag should be used in well-founded situations only to prevent
+-# any problems that could arise when processing this event further by
+-# foreign rules (various temporary and hidden devices mostly).
+-LABEL="dm_other"
+-ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="dm_end"
+-ENV{DM_COOKIE}=="?*", RUN+="$env{DM_SBIN_PATH}/dmsetup udevcomplete $env{DM_COOKIE}"
+-OPTIONS+="last_rule"
+-
+ LABEL="dm_end"



More information about the arch-commits mailing list