Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f84f68356b | ||
|
962d8cfa98 | ||
|
394b190c8d | ||
|
3a41e8f873 | ||
|
0ad1c8a484 | ||
|
98a5e85c0f | ||
|
80c3e0c27f | ||
|
dd753ee369 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/sedutil-1.12.tar.gz
|
||||
/sedutil-1.15.1.tar.gz
|
||||
|
@ -1,50 +1,20 @@
|
||||
From: Charles R. Anderson <cra@wpi.edu>
|
||||
Date: Tue, 16 May 2016 18:55 -0400
|
||||
|
||||
Remove LINUX_VERSION_CODE > 4.4.0 check to support older kernels that use the newer nvme_ioctl.h
|
||||
|
||||
From 5ca6100917a025f6e11ae20838e1e37e7db2d587 Mon Sep 17 00:00:00 2001
|
||||
From: JanLuca <jan@naumannsfamily.de>
|
||||
Date: Mon, 30 May 2016 00:21:48 +0200
|
||||
Subject: [PATCH] Use nvme_ioctl.h for newer kernel versions #55
|
||||
|
||||
The header linux/nvme.h was replaced by linux/nvme_ioctl.h in kernel versions greater than 4.4: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154
|
||||
|
||||
The needed structs and opcodes are copied into a new header file from nvme.h.
|
||||
|
||||
See also:
|
||||
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9cf8284b45110a4d98aea180a89c857e53bf850
|
||||
https://www.bountysource.com/issues/29775575-linux-nvme-h-has-been-renamed-in-linux-4-4
|
||||
---
|
||||
linux/DtaDevLinuxNvme.h | 8 ++-
|
||||
linux/DtaDevLinuxNvmeStructsOpCodes.h | 95 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 102 insertions(+), 1 deletion(-)
|
||||
create mode 100755 linux/DtaDevLinuxNvmeStructsOpCodes.h
|
||||
|
||||
diff --git a/linux/DtaDevLinuxNvme.h b/linux/DtaDevLinuxNvme.h
|
||||
index cc55761..7a67385 100755
|
||||
--- a/linux/DtaDevLinuxNvme.h
|
||||
+++ b/linux/DtaDevLinuxNvme.h
|
||||
@@ -18,7 +18,13 @@ along with sedutil. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff -up sedutil-1.15.1/linux/DtaDevLinuxNvme.h.nvme_ioctl sedutil-1.15.1/linux/DtaDevLinuxNvme.h
|
||||
--- sedutil-1.15.1/linux/DtaDevLinuxNvme.h.nvme_ioctl 2017-08-21 20:28:11.000000000 -0400
|
||||
+++ sedutil-1.15.1/linux/DtaDevLinuxNvme.h 2018-03-02 22:54:20.882144312 -0500
|
||||
@@ -19,8 +19,9 @@ along with sedutil. If not, see <http:/
|
||||
* C:E********************************************************************** */
|
||||
#pragma once
|
||||
-#include "linux/nvme.h"
|
||||
+#include <linux/version.h>
|
||||
#include <linux/version.h>
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
|
||||
+#if 1 || (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
|
||||
+#include <linux/nvme_ioctl.h>
|
||||
#include <linux/nvme_ioctl.h>
|
||||
+#include "DtaDevLinuxNvmeStructsOpCodes.h"
|
||||
+#else
|
||||
+#include <linux/nvme.h>
|
||||
+#endif
|
||||
#include "DtaStructures.h"
|
||||
#include "DtaDevLinuxDrive.h"
|
||||
|
||||
diff --git a/linux/DtaDevLinuxNvmeStructsOpCodes.h b/linux/DtaDevLinuxNvmeStructsOpCodes.h
|
||||
new file mode 100755
|
||||
index 0000000..b781949
|
||||
--- /dev/null
|
||||
+++ b/linux/DtaDevLinuxNvmeStructsOpCodes.h
|
||||
#else
|
||||
#include <linux/nvme.h>
|
||||
#endif
|
||||
diff -up sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h.nvme_ioctl sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h
|
||||
--- sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h.nvme_ioctl 2018-03-02 22:51:13.255083016 -0500
|
||||
+++ sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h 2018-03-02 22:51:13.255083016 -0500
|
||||
@@ -0,0 +1,95 @@
|
||||
+/*
|
||||
+ * Definitions for the NVM Express interface
|
@ -1,93 +0,0 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH SEDUTIL-CLI "8" "May 2017" "sedutil-cli 1.12" "System Administration Utilities"
|
||||
.SH NAME
|
||||
sedutil-cli \- manage self-encrypting drives
|
||||
.SH SYNOPSIS
|
||||
.B sedutil\-cli
|
||||
[\fI\,ACTION\/\fR] [\fI\,OPTION\/\fR]... [\fI\,DEVICE\/\fR]
|
||||
.SH DESCRIPTION
|
||||
A utility to manage self encrypting drives that conform
|
||||
to the Trusted Computing Group OPAL 2.0 SSC specification.
|
||||
.TP
|
||||
\fB\-v\fR
|
||||
increase verbosity, one to five v's
|
||||
.TP
|
||||
\fB\-n\fR
|
||||
no password hashing. Passwords will be sent in clear text!
|
||||
.TP
|
||||
\fBACTIONS:\fR
|
||||
.TP
|
||||
\fB\-\-scan\fR
|
||||
Scans the devices on the system, identifying Opal compliant devices
|
||||
.TP
|
||||
\fB\-\-query\fR <device>
|
||||
Display the Discovery 0 response of a device
|
||||
.TP
|
||||
\fB\-\-isValidSED\fR <device>
|
||||
Verify whether the given device is SED or not
|
||||
.TP
|
||||
\fB\-\-listLockingRanges\fR <password> <device>
|
||||
List all Locking Ranges
|
||||
.TP
|
||||
\fB\-\-listLockingRange\fR <0...n> <password> <device>
|
||||
List all Locking Ranges, 0 = GLobal 1..n = LRn
|
||||
.TP
|
||||
\fB\-\-eraseLockingRange\fR <0...n> <password> <device>
|
||||
Erase a Locking Range, 0 = GLobal 1..n = LRn
|
||||
.TP
|
||||
\fB\-\-setupLockingRange\fR <0...n> <RangeStart> <RangeLength> <password> <device>
|
||||
Setup a new Locking Range, 0 = GLobal 1..n = LRn
|
||||
.TP
|
||||
\fB\-\-initialSetup\fR <SIDpassword> <device>
|
||||
Setup the device for use with sedutil. <SIDpassword> is new SID and Admin1 password
|
||||
.TP
|
||||
\fB\-\-setSIDPassword\fR <SIDpassword> <newSIDpassword> <device>
|
||||
Change the SID password
|
||||
.TP
|
||||
\fB\-\-setAdmin1Pwd\fR <Admin1password> <newAdmin1password> <device>
|
||||
Change the Admin1 password
|
||||
.TP
|
||||
\fB\-\-setPassword\fR <oldpassword, "" for MSID> <userid> <newpassword> <device>
|
||||
Change the Enterprise password for userid "EraseMaster" or "BandMaster<n>", 0 <= n <= 1023
|
||||
.TP
|
||||
\fB\-\-setLockingRange\fR <0...n> <RW|RO|LK> <Admin1password> <device>
|
||||
Set the status of a Locking Range, 0 = GLobal 1..n = LRn
|
||||
.TP
|
||||
\fB\-\-enableLockingRange\fR <0...n> <Admin1password> <device>
|
||||
Enable a Locking Range, 0 = GLobal 1..n = LRn
|
||||
.TP
|
||||
\fB\-\-disableLockingRange\fR <0...n> <Admin1password> <device>
|
||||
Disable a Locking Range, 0 = GLobal 1..n = LRn
|
||||
.TP
|
||||
\fB\-\-setMBREnable\fR <on|off> <Admin1password> <device>
|
||||
Enable|Disable MBR shadowing
|
||||
.TP
|
||||
\fB\-\-setMBRDone\fR <on|off> <Admin1password> <device>
|
||||
set|unset MBRDone
|
||||
.TP
|
||||
\fB\-\-loadPBAimage\fR <Admin1password> <file> <device>
|
||||
Write <file> to MBR Shadow area
|
||||
.TP
|
||||
\fB\-\-revertTPer\fR <SIDpassword> <device>
|
||||
set the device back to factory defaults. This **ERASES ALL DATA**
|
||||
.TP
|
||||
\fB\-\-revertNoErase\fR <Admin1password> <device>
|
||||
deactivate the Locking SP without erasing the data on GLOBAL RANGE *ONLY*
|
||||
.TP
|
||||
\fB\-\-yesIreallywanttoERASEALLmydatausingthePSID\fR <PSID> <device>
|
||||
revert the device using the PSID *ERASING* *ALL* the data
|
||||
.TP
|
||||
\fB\-\-printDefaultPassword\fR <device>
|
||||
print MSID
|
||||
.SH EXAMPLES
|
||||
sedutil\-cli \fB\-\-scan\fR
|
||||
.PP
|
||||
sedutil\-cli \fB\-\-query\fR \fI\,/dev/sdc\/\fP
|
||||
.PP
|
||||
sedutil\-cli \fB\-\-yesIreallywanttoERASEALLmydatausingthePSID\fR <PSIDALLCAPSNODASHED> \fI\,/dev/sdc\/\fP
|
||||
.PP
|
||||
sedutil\-cli \fB\-\-initialSetup\fR <newSIDpassword> \fI\,/dev/sdc\/\fP
|
||||
.SH COPYRIGHT
|
||||
sedutil v1.12 Copyright 2014\-2016 Bright Plaza Inc. <drivetrust@drivetrust.com>
|
||||
.SH SEE ALSO
|
||||
See further documentation in /usr/share/doc/sedutil
|
63
sedutil.spec
63
sedutil.spec
@ -1,4 +1,4 @@
|
||||
%global gittag0 1.12
|
||||
%global gittag0 1.15.1
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
@ -8,33 +8,24 @@ Release: 4%{?dist}
|
||||
Summary: Tools to manage the activation and use of self encrypting drives
|
||||
|
||||
# Everything is GPLv3+ except:
|
||||
# - Common/pbkdf2/* which is GPLv2+, a bundled copy of some gnulib code.
|
||||
# - Common/Dta*Dump* which is BSD (https://github.com/Drive-Trust-Alliance/sedutil/issues/145)
|
||||
License: GPLv3+ and GPLv2+ and BSD
|
||||
# - Common/pbkdf2/* which is CC0, a bundled copy of Cifra: https://github.com/ctz/cifra
|
||||
License: GPLv3+ and CC0
|
||||
URL: https://github.com/Drive-Trust-Alliance/sedutil/wiki
|
||||
Source0: https://github.com/Drive-Trust-Alliance/%{name}/archive/%{gittag0}/%{name}-%{gittag0}.tar.gz
|
||||
# Make a manual page from the help output:
|
||||
#help2man --name=sedutil-cli \
|
||||
# --section=8 \
|
||||
# --no-info \
|
||||
# --version-string=%%{version} \
|
||||
# --no-discard-stderr \
|
||||
# --output=./dist/Release_x86_64/GNU-Linux/sedutil-cli.8 \
|
||||
# ./dist/Release_x86_64/GNU-Linux/sedutil-cli
|
||||
# Cleaned up with manual edits:
|
||||
Source1: sedutil-cli.8
|
||||
|
||||
# Modified version of https://github.com/Drive-Trust-Alliance/sedutil/pull/56.patch
|
||||
# to use linux/nvme_ioctl.h regardless of kernel version number
|
||||
Patch0: sedutil-1.12-nvme_ioctl.patch
|
||||
# to use linux/nvme_ioctl.h regardless of kernel version number so we can compile on EL7.
|
||||
Patch0: sedutil-1.15.1-nvme_ioctl.patch
|
||||
|
||||
# sedutil does not work on big-endian architectures
|
||||
ExcludeArch: ppc ppc64 s390 s390x
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ncurses-devel
|
||||
|
||||
# This package uses gnulib. It was granted an exception in:
|
||||
# https://fedorahosted.org/fpc/ticket/174
|
||||
Provides: bundled(gnulib)
|
||||
# This package uses a bundled copy of Cifra:
|
||||
# https://github.com/ctz/cifra/commit/319fdb764cd12e12b8296358cfcd640346c4d0dd
|
||||
Provides: bundled(cifra)
|
||||
|
||||
# Replaces msed, but doesn't provide a compatible CLI command
|
||||
Obsoletes: msed <= 0.23-0.20
|
||||
@ -55,11 +46,11 @@ the PBA image itself.
|
||||
|
||||
%prep
|
||||
%setup -q -n sedutil-%{gittag0}
|
||||
%patch0 -p1 -b .nvme_ioctl
|
||||
%{?el7:%patch0 -p1 -b .nvme_ioctl}
|
||||
# Adjust the GitVersion.sh script to just use the git tag from the
|
||||
# checkout so we don't need a full git tree or the git tool itself.
|
||||
cd linux
|
||||
sed -i -e's/^GITVER=.*/GITVER=%{gittag0}/' GitVersion.sh
|
||||
sed -i -e's/tarball/%{gittag0}/' GitVersion.sh
|
||||
# Remove stray execute permissions from source code
|
||||
find . -type f -name '*.h' -exec chmod -x {} \;
|
||||
find . -type f -name '*.cpp' -exec chmod -x {} \;
|
||||
@ -72,9 +63,6 @@ find . -type f -name '*.cpp' -exec chmod -x {} \;
|
||||
cd linux/CLI
|
||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" CONF=Release_x86_64
|
||||
|
||||
# Copy in our manual page
|
||||
cp -p %{SOURCE1} dist/Release_x86_64/GNU-Linux/sedutil-cli.8
|
||||
|
||||
cd ../../LinuxPBA
|
||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" CONF=Release
|
||||
|
||||
@ -83,7 +71,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
install -p -m755 linux/CLI/dist/Release_x86_64/GNU-Linux/sedutil-cli $RPM_BUILD_ROOT%{_sbindir}/sedutil-cli
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
install -p -m644 linux/CLI/dist/Release_x86_64/GNU-Linux/sedutil-cli.8 $RPM_BUILD_ROOT%{_mandir}/man8/sedutil-cli.8
|
||||
install -p -m644 docs/sedutil-cli.8 $RPM_BUILD_ROOT%{_mandir}/man8/sedutil-cli.8
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
|
||||
install -p -m755 LinuxPBA/dist/Release/GNU-Linux/linuxpba $RPM_BUILD_ROOT%{_libexecdir}/linuxpba
|
||||
@ -98,6 +86,31 @@ install -p -m755 LinuxPBA/dist/Release/GNU-Linux/linuxpba $RPM_BUILD_ROOT%{_libe
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Mar 02 2018 Charles R. Anderson <cra@wpi.edu> - 1.15.1-1
|
||||
- Update to 1.15.1
|
||||
- Upstream swapped bundled gnulib GPLv2+ for bundled Cifra CC0
|
||||
|
||||
* Sun Feb 18 2018 Charles R. Anderson <cra@wpi.edu> - 1.12-8
|
||||
- add BR gcc-c++
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Tue May 16 2017 Charles R. Anderson <cra@wpi.edu> - 1.12-4
|
||||
- Update patch for epel7 build with older kernel version numbering
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (sedutil-1.12.tar.gz) = f17fbb5a6d71d5bdd59d0fc85eed11036a8e365545133bc1374a733ce1975d6c8dd2cdc500bd46cffbec1f2bef621a98ca392e0dd314734c1ef12c073d70b0de
|
||||
SHA512 (sedutil-1.15.1.tar.gz) = 9708ef307b457fad2f45735b044685ac6731c353af428c49ff0e312190f3bdc521bcfa71a9e1239d9ffe637d18293a99b09b7e001df96494cdce53f5442750f1
|
||||
|
Loading…
Reference in New Issue
Block a user