[arch-commits] CVS update of arch/build/base/cryptsetup (2 files)

Thomas Baechler thomas at archlinux.org
Thu Jun 21 12:33:12 EDT 2007


    Date: Thursday, June 21, 2007 @ 12:33:12
  Author: thomas
    Path: /home/cvs-arch/arch/build/base/cryptsetup

   Added: cryptsetup-1.0.5-run_udevsettle.patch (1.1)
Modified: PKGBUILD (1.6 -> 1.7)

hopefully fix "cannot read from key storage" bug


---------------------------------------+
 PKGBUILD                              |   19 ++++++++++++-------
 cryptsetup-1.0.5-run_udevsettle.patch |   29 +++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 7 deletions(-)


Index: arch/build/base/cryptsetup/PKGBUILD
diff -u arch/build/base/cryptsetup/PKGBUILD:1.6 arch/build/base/cryptsetup/PKGBUILD:1.7
--- arch/build/base/cryptsetup/PKGBUILD:1.6	Sat May 12 13:12:11 2007
+++ arch/build/base/cryptsetup/PKGBUILD	Thu Jun 21 12:33:12 2007
@@ -1,30 +1,34 @@
-# $Id: PKGBUILD,v 1.6 2007/05/12 17:12:11 thomas Exp $
+# $Id: PKGBUILD,v 1.7 2007/06/21 16:33:12 thomas Exp $
 # Maintainer: Judd Vinet <jvinet at zeroflux.org>
 pkgname=cryptsetup
 pkgver=1.0.5
-pkgrel=2
+pkgrel=3
 pkgdesc="A userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
 arch=(i686 x86_64)
 license=('GPL')
 url="http://luks.endorphin.org/dm-crypt"
 depends=('device-mapper' 'libgcrypt' 'popt' 'e2fsprogs')
-source=(http://luks.endorphin.org/source/cryptsetup-$pkgver.tar.bz2 \
-        encrypt_hook encrypt_install luksOpen-status.patch)
+source=(http://luks.endorphin.org/source/cryptsetup-$pkgver.tar.bz2
+        encrypt_hook encrypt_install luksOpen-status.patch
+        cryptsetup-1.0.5-run_udevsettle.patch)
 md5sums=('0aa2f94c39123f1a0352983e5366179c'
          '40fee2419cd444cfb283c311f9555d2d'
          '70fe6feacc8e7c735ba8baa95f9f61a1'
-         'd4be8d2059d5427c057be4de4e948887')
+         'd4be8d2059d5427c057be4de4e948887'
+         '0c0af7d348da6e85dc4bdbd8c0df9e13')
+options=(!libtool !emptydirs)
 
 build() {
   cd $startdir/src/$pkgname-$pkgver
   # suppress "Command successful" message on luksOpen
   patch -Np1 -i $startdir/src/luksOpen-status.patch
+  patch -Np1 -i $startdir/src/cryptsetup-1.0.5-run_udevsettle.patch
   ./configure --prefix=/usr --disable-static
   make || return 1
   make DESTDIR=$startdir/pkg install
   # include a static cryptsetup binary for initrd setups
   make clean
-  cd $startdir/src/$pkgname-luks-$pkgver
+  cd $startdir/src/$pkgname-$pkgver
   ./configure --prefix=/usr --enable-static
   make || return 1
   # include a static cryptsetup binary for initrd setups
@@ -33,5 +37,6 @@
   install -D -m644 $startdir/src/encrypt_hook $startdir/pkg/lib/initcpio/hooks/encrypt
   install -D -m644 $startdir/src/encrypt_install $startdir/pkg/lib/initcpio/install/encrypt
   
-  find $startdir/pkg -name "*.la" -exec rm -f {} \;
+  # fix permissions
+  find $startdir/pkg -type d -exec chmod 755 {} \;
 }
Index: arch/build/base/cryptsetup/cryptsetup-1.0.5-run_udevsettle.patch
diff -u /dev/null arch/build/base/cryptsetup/cryptsetup-1.0.5-run_udevsettle.patch:1.1
--- /dev/null	Thu Jun 21 12:33:12 2007
+++ arch/build/base/cryptsetup/cryptsetup-1.0.5-run_udevsettle.patch	Thu Jun 21 12:33:12 2007
@@ -0,0 +1,29 @@
+Index: cryptsetup-1.0.5/lib/libdevmapper.c
+===================================================================
+--- cryptsetup-1.0.5.orig/lib/libdevmapper.c
++++ cryptsetup-1.0.5/lib/libdevmapper.c
+@@ -18,6 +18,13 @@
+ 
+ #define	CRYPT_TARGET	"crypt"
+ 
++#define UDEVSETTLE	"/sbin/udevsettle"
++
++static void run_udevsettle(void)
++{
++	system(UDEVSETTLE);
++}
++
+ static void set_dm_error(int level, const char *file, int line,
+                          const char *f, ...)
+ {
+@@ -184,6 +191,9 @@ static int dm_create_device(int reload, 
+ 	if (dmi.read_only)
+ 		options->flags |= CRYPT_FLAG_READONLY;
+ 
++	/* run udevsettle to avoid problems with busy dm devices */
++	run_udevsettle();
++
+ 	r = 0;
+ 	
+ out:
+




More information about the arch-commits mailing list