From f2ff4d0825cc8fed8b8bf69cb2b4b4964dc7175d Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Thu, 9 Aug 2018 15:14:19 -0400 Subject: [PATCH] Fix tests on LUKSv2-default cryptsetup --- luksmeta-9-tests.patch | 26 ++++++++++++++++++++++++++ luksmeta.spec | 8 ++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 luksmeta-9-tests.patch diff --git a/luksmeta-9-tests.patch b/luksmeta-9-tests.patch new file mode 100644 index 0000000..d64119f --- /dev/null +++ b/luksmeta-9-tests.patch @@ -0,0 +1,26 @@ +From 052c5d53d56f52cba95a569b3f2648b7cd647f1e Mon Sep 17 00:00:00 2001 +From: Nathaniel McCallum +Date: Thu, 9 Aug 2018 15:07:17 -0400 +Subject: [PATCH] Specify LUKSv1 during luksFormat + +This fixes tests on builds of cryptsetup which default to LUKSv2. +--- + test-luksmeta | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test-luksmeta b/test-luksmeta +index fd17ead..f1e8b2e 100755 +--- a/test-luksmeta ++++ b/test-luksmeta +@@ -11,7 +11,7 @@ function onexit() { + 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.17.1 + diff --git a/luksmeta.spec b/luksmeta.spec index 74ac8d0..e8dea73 100644 --- a/luksmeta.spec +++ b/luksmeta.spec @@ -1,11 +1,12 @@ Name: luksmeta Version: 9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utility for storing small metadata in the LUKSv1 header License: LGPLv2+ URL: https://github.com/latchset/%{name} Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +Patch0: luksmeta-9-tests.patch BuildRequires: gcc BuildRequires: asciidoc @@ -33,7 +34,7 @@ Requires: pkgconfig This package contains development files for the LUKSMeta library. %prep -%setup -q +%autosetup %build %configure @@ -64,6 +65,9 @@ make %{?_smp_mflags} check %{_libdir}/pkgconfig/luksmeta.pc %changelog +* Thu Aug 09 2018 Nathaniel McCallum - 9-2 +- Add (upstream) patch to fix tests on LUKSv2-default cryptsetup + * Thu Aug 09 2018 Nathaniel McCallum - 9-1 - New upstream release - Add asciidoc build require to generate man pages