1
0
Quellcode durchsuchen

Fix error in test-luksmeta introduced by cryptsetup defaulting to luks2

Christoph Biedl vor 5 Jahren
Ursprung
Commit
91e7edba0e

+ 19 - 0
debian/patches/fix.test-luksmeta.patch

@@ -0,0 +1,19 @@
+Description: Work around test-luksmeta fail when running as non-root
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2019-03-01
+Forwarded: no
+
+    The cryptsetup luksFormat program now fails when running as
+    non-root, see #923513
+
+--- a/test-luksmeta
++++ b/test-luksmeta
+@@ -11,7 +11,7 @@
+ trap 'onexit' EXIT
+ 
+ truncate -s 4M $tmp
+-echo -n foo | cryptsetup luksFormat $tmp -
++echo -n foo | cryptsetup luksFormat --type luks1 $tmp -
+ 
+ ! ./luksmeta test -d $tmp
+ 

+ 2 - 2
debian/patches/local.dont-fail-tests-for-disabled-module-load.patch

@@ -38,9 +38,9 @@ Bug-Debian: https://bugs.debian.org/881864
  trap 'onexit' EXIT
  
  truncate -s 4M $tmp
--echo -n foo | /sbin/cryptsetup luksFormat $tmp -
+-echo -n foo | /sbin/cryptsetup luksFormat --type luks1 $tmp -
 +PRE="$(md5sum $tmp)"
-+echo -n foo | /sbin/cryptsetup luksFormat $tmp - || true
++echo -n foo | /sbin/cryptsetup luksFormat --type luks1 $tmp - || true
 +PST="$(md5sum $tmp)"
 +if [ "$PRE" = "$PST" ] ; then
 +    echo 'cryptsetup failed, assuming AF_ALG,SOCK_SEQPACKET failure'

+ 2 - 2
debian/patches/local.test-luksmeta.patch

@@ -9,8 +9,8 @@ Forwarded: not-needed
  trap 'onexit' EXIT
  
  truncate -s 4M $tmp
--echo -n foo | cryptsetup luksFormat $tmp -
-+echo -n foo | /sbin/cryptsetup luksFormat $tmp -
+-echo -n foo | cryptsetup luksFormat --type luks1 $tmp -
++echo -n foo | /sbin/cryptsetup luksFormat --type luks1 $tmp -
  
  ! ./luksmeta test -d $tmp
  

+ 1 - 0
debian/patches/series

@@ -1,6 +1,7 @@
 # cherry-picked from upstream
 
 fix.relax-content-checks.patch
+fix.test-luksmeta.patch
 
 local.test-luksmeta.patch
 local.dont-fail-tests-for-disabled-module-load.patch