summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Witschel2018-12-10 00:08:43 +0100
committerJonas Witschel2018-12-10 00:08:43 +0100
commit709719b205d2ff886835035e90bc96c30c099f87 (patch)
tree9194727dab397f58b52e49ff6c206ffa17c382ab
parent197ac712c0cab75f80654a70b134d7219e31ab2c (diff)
downloadaur-709719b205d2ff886835035e90bc96c30c099f87.tar.gz
upgpkg: luksmeta 9-2
Fix upstream issue #6
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD18
-rw-r--r--Relax-content-tests-in-test-suite.patch148
3 files changed, 164 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3187786dcf5..820d89a403e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,16 @@
pkgbase = luksmeta
pkgdesc = Library for storing metadata in the LUKSv1 header
pkgver = 9
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/latchset/luksmeta
arch = x86_64
license = LGPL
makedepends = asciidoc
depends = cryptsetup
source = https://github.com/latchset/luksmeta/releases/download/v9/luksmeta-9.tar.bz2
+ source = Relax-content-tests-in-test-suite.patch
sha512sums = eeecc3de9d621c380d29b2f2ca6ce715f09c20aac8ffc6a3d3cc7dc30c5dc46df686e61928d0accf7e7281ad9baa6ee59a0cf5b58635a311769d8e08c5cc94bd
+ sha512sums = 145f6ceb7bad2090067c5e994bb0f89ce6388cc3c5b3e27a48704c3ae33615a81dcf309b54aa0d0004782890f9260560a24f274d442b3a397a352f5bac5b638e
pkgname = luksmeta
diff --git a/PKGBUILD b/PKGBUILD
index 61f915c7a61..1f58ff86f00 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,23 @@
# Maintainer: Jonas Witschel <diabonas at gmx dot de>
pkgname=luksmeta
pkgver=9
-pkgrel=1
+pkgrel=2
pkgdesc='Library for storing metadata in the LUKSv1 header'
arch=('x86_64')
url='https://github.com/latchset/luksmeta'
license=('LGPL')
depends=('cryptsetup')
makedepends=('asciidoc')
-source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.bz2")
-sha512sums=('eeecc3de9d621c380d29b2f2ca6ce715f09c20aac8ffc6a3d3cc7dc30c5dc46df686e61928d0accf7e7281ad9baa6ee59a0cf5b58635a311769d8e08c5cc94bd')
+source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.bz2"
+ 'Relax-content-tests-in-test-suite.patch')
+sha512sums=('eeecc3de9d621c380d29b2f2ca6ce715f09c20aac8ffc6a3d3cc7dc30c5dc46df686e61928d0accf7e7281ad9baa6ee59a0cf5b58635a311769d8e08c5cc94bd'
+ '145f6ceb7bad2090067c5e994bb0f89ce6388cc3c5b3e27a48704c3ae33615a81dcf309b54aa0d0004782890f9260560a24f274d442b3a397a352f5bac5b638e')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ # https://github.com/latchset/luksmeta/issues/6
+ patch --strip=1 --input="$srcdir/Relax-content-tests-in-test-suite.patch"
+}
build() {
cd "$pkgname-$pkgver"
@@ -19,10 +27,10 @@ build() {
check() {
cd "$pkgname-$pkgver"
- make -k check
+ make check
}
package() {
cd "$pkgname-$pkgver"
- make DESTDIR="$pkgdir/" install
+ make DESTDIR="$pkgdir" install
}
diff --git a/Relax-content-tests-in-test-suite.patch b/Relax-content-tests-in-test-suite.patch
new file mode 100644
index 00000000000..a1e45103688
--- /dev/null
+++ b/Relax-content-tests-in-test-suite.patch
@@ -0,0 +1,148 @@
+From 334430e562a196bc1f0bad051103ca5dca31c266 Mon Sep 17 00:00:00 2001
+From: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: Sun, 9 Dec 2018 22:31:22 +0000
+Subject: [PATCH] Relax content tests in test suite
+
+Starting with version 2.0.5, cryptset 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
+
+ Wipe full header areas (including unused) during LUKS format.
+
+While this is the right thing to do, it breaks luksmeta tests. So
+relax them.
+---
+ test-lm-assumptions.c | 3 ++-
+ test-lm-big.c | 4 ++--
+ test-lm-init.c | 4 ++--
+ test-lm-one.c | 4 ++--
+ test-lm-two.c | 8 ++++----
+ 5 files changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/test-lm-assumptions.c b/test-lm-assumptions.c
+index d9ff20b..b4f293f 100644
+--- a/test-lm-assumptions.c
++++ b/test-lm-assumptions.c
+@@ -28,7 +28,8 @@ main(int argc, char *argv[])
+ /* 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);
+diff --git a/test-lm-big.c b/test-lm-big.c
+index 6098e59..eb94d3b 100644
+--- a/test-lm-big.c
++++ b/test-lm-big.c
+@@ -111,7 +111,7 @@ main(int argc, char *argv[])
+
+ assert(test_layout((range_t[]) {
+ { 0, 1024 }, /* LUKS header */
+- { 1024, offset - 1024, true }, /* Keyslot Area */
++ { 1024, 3072, true }, /* Keyslot Area */
+ { offset, 4096 }, /* luksmeta header */
+ { offset + 4096, 4096 }, /* luksmeta slot 0 */
+ { offset + 8192, 4096 }, /* luksmeta slot 0 (cont) */
+@@ -127,7 +127,7 @@ main(int argc, char *argv[])
+
+ 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 */
+ }));
+diff --git a/test-lm-init.c b/test-lm-init.c
+index 2a6cb45..b16d597 100644
+--- a/test-lm-init.c
++++ b/test-lm-init.c
+@@ -57,7 +57,7 @@ main(int argc, char *argv[])
+ /* 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 @@ main(int argc, char *argv[])
+ 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 */
+ }));
+
+diff --git a/test-lm-one.c b/test-lm-one.c
+index 8deb70a..18613e0 100644
+--- a/test-lm-one.c
++++ b/test-lm-one.c
+@@ -49,7 +49,7 @@ main(int argc, char *argv[])
+ /* 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 */
+ { offset + 4096, 4096 }, /* luksmeta slot 0 */
+ END(offset + 8192), /* Rest of the file */
+@@ -68,7 +68,7 @@ main(int argc, char *argv[])
+ /* 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 */
+ }));
+diff --git a/test-lm-two.c b/test-lm-two.c
+index 78fea5b..9f0b1c5 100644
+--- a/test-lm-two.c
++++ b/test-lm-two.c
+@@ -53,7 +53,7 @@ main(int argc, char *argv[])
+
+ assert(test_layout((range_t[]) {
+ { 0, 1024 }, /* LUKS header */
+- { 1024, offset - 1024, true }, /* Keyslot Area */
++ { 1024, 3072, true }, /* Keyslot Area */
+ { offset, 4096 }, /* luksmeta header */
+ { offset + 4096, 4096 }, /* luksmeta slot 0 */
+ END(offset + 8192), /* Rest of the file */
+@@ -70,7 +70,7 @@ main(int argc, char *argv[])
+
+ assert(test_layout((range_t[]) {
+ { 0, 1024 }, /* LUKS header */
+- { 1024, offset - 1024, true }, /* Keyslot Area */
++ { 1024, 3072, true }, /* Keyslot Area */
+ { offset, 4096 }, /* luksmeta header */
+ { offset + 4096, 4096 }, /* luksmeta slot 0 */
+ { offset + 8192, 4096 }, /* luksmeta slot 1 */
+@@ -88,7 +88,7 @@ main(int argc, char *argv[])
+ assert(luksmeta_wipe(cd, 0, UUID0) == 0);
+ assert(test_layout((range_t[]) {
+ { 0, 1024 }, /* LUKS header */
+- { 1024, offset - 1024, true }, /* Keyslot Area */
++ { 1024, 3072, true }, /* Keyslot Area */
+ { offset, 4096 }, /* luksmeta header */
+ { offset + 4096, 4096, true }, /* luksmeta slot 0 */
+ { offset + 8192, 4096 }, /* luksmeta slot 1 */
+@@ -99,7 +99,7 @@ main(int argc, char *argv[])
+ assert(luksmeta_wipe(cd, 1, UUID1) == 0);
+ 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 */
+ }));
+--
+2.19.2
+