Compare commits

...

8 Commits
f26 ... master

Author SHA1 Message Date
Fedora Release Engineering
f84f68356b - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 23:02:59 +00:00
Fedora Release Engineering
962d8cfa98 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 15:10:03 +00:00
Fedora Release Engineering
394b190c8d - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 05:56:13 +00:00
Charles R. Anderson
3a41e8f873 Update to 1.15.1
Upstream swapped bundled gnulib GPLv2+ for bundled Cifra CC0
2018-03-02 23:37:11 -05:00
Charles R. Anderson
0ad1c8a484 add BR gcc-c++ 2018-02-18 19:20:06 -05:00
Fedora Release Engineering
98a5e85c0f - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 16:28:19 +00:00
Fedora Release Engineering
80c3e0c27f - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 08:19:44 +00:00
Fedora Release Engineering
dd753ee369 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 18:23:56 +00:00
5 changed files with 53 additions and 162 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/sedutil-1.12.tar.gz /sedutil-1.12.tar.gz
/sedutil-1.15.1.tar.gz

View File

@ -1,50 +1,20 @@
From: Charles R. Anderson <cra@wpi.edu> diff -up sedutil-1.15.1/linux/DtaDevLinuxNvme.h.nvme_ioctl sedutil-1.15.1/linux/DtaDevLinuxNvme.h
Date: Tue, 16 May 2016 18:55 -0400 --- 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
Remove LINUX_VERSION_CODE > 4.4.0 check to support older kernels that use the newer nvme_ioctl.h @@ -19,8 +19,9 @@ along with sedutil. If not, see <http:/
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/>.
* C:E********************************************************************** */ * C:E********************************************************************** */
#pragma once #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)) +#if 1 || (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
+#include <linux/nvme_ioctl.h> #include <linux/nvme_ioctl.h>
+#include "DtaDevLinuxNvmeStructsOpCodes.h" +#include "DtaDevLinuxNvmeStructsOpCodes.h"
+#else #else
+#include <linux/nvme.h> #include <linux/nvme.h>
+#endif #endif
#include "DtaStructures.h" diff -up sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h.nvme_ioctl sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h
#include "DtaDevLinuxDrive.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
diff --git a/linux/DtaDevLinuxNvmeStructsOpCodes.h b/linux/DtaDevLinuxNvmeStructsOpCodes.h
new file mode 100755
index 0000000..b781949
--- /dev/null
+++ b/linux/DtaDevLinuxNvmeStructsOpCodes.h
@@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
+/* +/*
+ * Definitions for the NVM Express interface + * Definitions for the NVM Express interface

View File

@ -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

View File

@ -1,4 +1,4 @@
%global gittag0 1.12 %global gittag0 1.15.1
%global _hardened_build 1 %global _hardened_build 1
@ -8,33 +8,24 @@ Release: 4%{?dist}
Summary: Tools to manage the activation and use of self encrypting drives Summary: Tools to manage the activation and use of self encrypting drives
# Everything is GPLv3+ except: # Everything is GPLv3+ except:
# - Common/pbkdf2/* which is GPLv2+, a bundled copy of some gnulib code. # - Common/pbkdf2/* which is CC0, a bundled copy of Cifra: https://github.com/ctz/cifra
# - Common/Dta*Dump* which is BSD (https://github.com/Drive-Trust-Alliance/sedutil/issues/145) License: GPLv3+ and CC0
License: GPLv3+ and GPLv2+ and BSD
URL: https://github.com/Drive-Trust-Alliance/sedutil/wiki URL: https://github.com/Drive-Trust-Alliance/sedutil/wiki
Source0: https://github.com/Drive-Trust-Alliance/%{name}/archive/%{gittag0}/%{name}-%{gittag0}.tar.gz 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 # Modified version of https://github.com/Drive-Trust-Alliance/sedutil/pull/56.patch
# to use linux/nvme_ioctl.h regardless of kernel version number # to use linux/nvme_ioctl.h regardless of kernel version number so we can compile on EL7.
Patch0: sedutil-1.12-nvme_ioctl.patch Patch0: sedutil-1.15.1-nvme_ioctl.patch
# sedutil does not work on big-endian architectures # sedutil does not work on big-endian architectures
ExcludeArch: ppc ppc64 s390 s390x ExcludeArch: ppc ppc64 s390 s390x
BuildRequires: gcc-c++
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
# This package uses gnulib. It was granted an exception in: # This package uses a bundled copy of Cifra:
# https://fedorahosted.org/fpc/ticket/174 # https://github.com/ctz/cifra/commit/319fdb764cd12e12b8296358cfcd640346c4d0dd
Provides: bundled(gnulib) Provides: bundled(cifra)
# Replaces msed, but doesn't provide a compatible CLI command # Replaces msed, but doesn't provide a compatible CLI command
Obsoletes: msed <= 0.23-0.20 Obsoletes: msed <= 0.23-0.20
@ -55,11 +46,11 @@ the PBA image itself.
%prep %prep
%setup -q -n sedutil-%{gittag0} %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 # 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. # checkout so we don't need a full git tree or the git tool itself.
cd linux 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 # Remove stray execute permissions from source code
find . -type f -name '*.h' -exec chmod -x {} \; find . -type f -name '*.h' -exec chmod -x {} \;
find . -type f -name '*.cpp' -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 cd linux/CLI
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" CONF=Release_x86_64 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 cd ../../LinuxPBA
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" CONF=Release 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 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 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} mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
install -p -m755 LinuxPBA/dist/Release/GNU-Linux/linuxpba $RPM_BUILD_ROOT%{_libexecdir}/linuxpba 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 %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 * Tue May 16 2017 Charles R. Anderson <cra@wpi.edu> - 1.12-4
- Update patch for epel7 build with older kernel version numbering - Update patch for epel7 build with older kernel version numbering

View File

@ -1 +1 @@
SHA512 (sedutil-1.12.tar.gz) = f17fbb5a6d71d5bdd59d0fc85eed11036a8e365545133bc1374a733ce1975d6c8dd2cdc500bd46cffbec1f2bef621a98ca392e0dd314734c1ef12c073d70b0de SHA512 (sedutil-1.15.1.tar.gz) = 9708ef307b457fad2f45735b044685ac6731c353af428c49ff0e312190f3bdc521bcfa71a9e1239d9ffe637d18293a99b09b7e001df96494cdce53f5442750f1