Browse Source

Replace patches with version from upstream

Christoph Biedl 1 year ago
parent
commit
e9b037d280

+ 40 - 39
debian/patches/fix.relax-content-checks.patch

@@ -1,43 +1,36 @@
-Description: Relax content tests in test suite
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Date: 2018-12-09
-Forwarded: yes
-Bug: https://github.com/latchset/luksmeta/issues/6
-Bug-Debian: https://bugs.debian.org/915256
+Subject: Relax content tests in test suite
+Origin: v9-1-g9c550e0 <https://github.com/latchset/luksmeta/commit/v9-1-g9c550e0>
+Upstream-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: Mon Dec 10 14:25:33 2018 +0100
 
-    Starting with version 2.0.5, cryptset wipes the full LUKS header
+    Starting with version 2.0.5, cryptsetup wipes the full LUKS header
     and fills unused sections with random data, this was introduced
     in commit
 
-    commit c2bce3e93ecee41f661b589ee28f112eb538259e
-    Author: Milan Broz <gmazyland@gmail.com>
-    Date:   Sun Oct 14 13:11:50 2018 +0200
+        commit c2bce3e93ecee41f661b589ee28f112eb538259e
+        Author: Milan Broz <gmazyland@gmail.com>
+        Date:   Sun Oct 14 13:11:50 2018 +0200
 
-        Wipe full header areas (including unused) during LUKS format.
+            Wipe full header areas (including unused) during LUKS format.
 
     While this is the right thing to do, it breaks luksmeta tests. So
     relax them.
 
---- a/test-lm-init.c
-+++ b/test-lm-init.c
-@@ -57,7 +57,7 @@
+    Bug-Debian: https://bugs.debian.org/915256
+    Resolves: https://github.com/latchset/luksmeta/issues/6
+
+--- a/test-lm-assumptions.c
++++ b/test-lm-assumptions.c
+@@ -28,7 +28,8 @@
      /* Test the layout state. */
      assert(test_layout((range_t[]) {
-         { 0, 1024 },                   /* LUKS header */
--        { 1024, offset - 1024, true }, /* Keyslot Area */
-+        { 1024, 3072, true },          /* Keyslot Area */
-         { offset, 4096 },              /* luksmeta header */
-         END(offset + 4096),            /* Rest of the file */
-     }));
-@@ -106,7 +106,7 @@
-     assert(luksmeta_test(cd) == -ENOENT);
-     assert(test_layout((range_t[]) {
-         { 0, 1024 },                   /* LUKS header */
--        { 1024, offset - 1024, true }, /* Keyslot Area */
-+        { 1024, 3072, true },          /* Keyslot Area */
-         END(offset),                   /* Rest of the file */
+         { 0, 1024 },                    /* LUKS header */
+-        END(1024),                    /* Rest of the file */
++        { 1024, 3072, true },           /* Keyslot Area */
++        { 0, 0 },
      }));
  
+     unlink(filename);
 --- a/test-lm-big.c
 +++ b/test-lm-big.c
 @@ -111,7 +111,7 @@
@@ -58,6 +51,26 @@ Bug-Debian: https://bugs.debian.org/915256
          { offset, 4096 },              /* luksmeta header */
          END(offset + 4096),            /* Rest of the file */
      }));
+--- a/test-lm-init.c
++++ b/test-lm-init.c
+@@ -57,7 +57,7 @@
+     /* Test the layout state. */
+     assert(test_layout((range_t[]) {
+         { 0, 1024 },                   /* LUKS header */
+-        { 1024, offset - 1024, true }, /* Keyslot Area */
++        { 1024, 3072, true },          /* Keyslot Area */
+         { offset, 4096 },              /* luksmeta header */
+         END(offset + 4096),            /* Rest of the file */
+     }));
+@@ -106,7 +106,7 @@
+     assert(luksmeta_test(cd) == -ENOENT);
+     assert(test_layout((range_t[]) {
+         { 0, 1024 },                   /* LUKS header */
+-        { 1024, offset - 1024, true }, /* Keyslot Area */
++        { 1024, 3072, true },          /* Keyslot Area */
+         END(offset),                   /* Rest of the file */
+     }));
+ 
 --- a/test-lm-one.c
 +++ b/test-lm-one.c
 @@ -49,7 +49,7 @@
@@ -116,15 +129,3 @@ Bug-Debian: https://bugs.debian.org/915256
          { offset, 4096 },              /* luksmeta header */
          END(offset + 4096),            /* Rest of the file */
      }));
---- a/test-lm-assumptions.c
-+++ b/test-lm-assumptions.c
-@@ -28,7 +28,8 @@
-     /* Test the layout state. */
-     assert(test_layout((range_t[]) {
-         { 0, 1024 },                    /* LUKS header */
--        END(1024),                    /* Rest of the file */
-+        { 1024, 3072, true },           /* Keyslot Area */
-+        { 0, 0 },
-     }));
- 
-     unlink(filename);

+ 19 - 0
debian/patches/1569669851.v9-3-gaf81262.force-creation-of-luks1-containers-in-test-suite.patch

@@ -0,0 +1,19 @@
+Subject: Force creation of LUKS1 containers in test suite
+Origin: v9-3-gaf81262 <https://github.com/latchset/luksmeta/commit/v9-3-gaf81262>
+Upstream-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: Sat Sep 28 13:24:11 2019 +0200
+
+    Cryptsetup defaults to LUKS2 since version 2.1, make sure to create
+    LUKS1 containers instead by using the "--type luks1" argument.
+
+--- 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
+ 

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

@@ -1,19 +0,0 @@
-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/series

@@ -1,7 +1,7 @@
 # cherry-picked from upstream
 
-fix.relax-content-checks.patch
-fix.test-luksmeta.patch
+1544448333.v9-1-g9c550e0.relax-content-tests-in-test-suite.patch
+1569669851.v9-3-gaf81262.force-creation-of-luks1-containers-in-test-suite.patch
 
 local.test-luksmeta.patch
 local.dont-fail-tests-for-disabled-module-load.patch