Fix tests on LUKSv2-default cryptsetup

This commit is contained in:
Nathaniel McCallum 2018-08-09 15:14:19 -04:00
parent b10510da43
commit f2ff4d0825
2 changed files with 32 additions and 2 deletions

26
luksmeta-9-tests.patch Normal file
View File

@ -0,0 +1,26 @@
From 052c5d53d56f52cba95a569b3f2648b7cd647f1e Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <npmccallum@redhat.com>
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

View File

@ -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 <npmccallum@redhat.com> - 9-2
- Add (upstream) patch to fix tests on LUKSv2-default cryptsetup
* Thu Aug 09 2018 Nathaniel McCallum <npmccallum@redhat.com> - 9-1
- New upstream release
- Add asciidoc build require to generate man pages