Package init

This commit is contained in:
overweight 2019-09-30 11:03:02 -04:00
commit 69a7e09dcd
3 changed files with 100 additions and 0 deletions

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

BIN
luksmeta-9.tar.bz2 Normal file

Binary file not shown.

74
luksmeta.spec Normal file
View File

@ -0,0 +1,74 @@
Name: luksmeta
Version: 9
Release: 3
Summary: LUKSMeta is a simple library for storing 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: 0000-luksmeta-9-tests.patch
BuildRequires: gcc asciidoc pkgconfig
BuildRequires: cryptsetup-devel git
Provides: lib%{name}
Obsoletes: lib%{name}
%description
LUKSMeta is a simple library for storing metadata in the LUKSv1 header. Some projects need
to store additional metadata about a LUKS volume that is accessable before unlocking it.
Fortunately, there is a gap in the LUKS header between the end of the slot area and the
payload offset, LUKSMeta uses this hole to store additional metadata.
%package devel
Summary: Header files and other developing files
Requires: %{name} = %{version}-%{release}
Provides: lib%{name}-devel
Obsoletes: lib%{name}-devel
%description devel
This package contained all files for development.
%package help
Summary: Documents for %{name}
Buildarch: noarch
Requires: man info
%description help
Man pages and other related documents for %{name}.
%prep
%autosetup -n %{name}-%{version} -p1 -Sgit
%build
%configure
%make_build
%install
%make_install
%check
make %{?_smp_mflags} check
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%files
%exclude %{_libdir}/libluksmeta.la
%license COPYING
%{_bindir}/luksmeta
%{_libdir}/libluksmeta.so.*
%files devel
%{_includedir}/luksmeta.h
%{_libdir}/libluksmeta.so
%{_libdir}/pkgconfig/luksmeta.pc
%files help
%{_mandir}/man8/luksmeta.8*
%changelog
* Fri Aug 30 2019 guiyao<guiyao@huawei.com> - 9-3
- Package init