Blame sedutil.spec

Charles R. Anderson 910c16
%global gittag0 1.12
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%global _hardened_build 1
Charles R. Anderson 910c16
Charles R. Anderson 910c16
Name:		sedutil
Charles R. Anderson 910c16
Version:	%{gittag0}
Fedora Release Engineering dd753e
Release:	5%{?dist}
Charles R. Anderson 910c16
Summary:	Tools to manage the activation and use of self encrypting drives
Charles R. Anderson 910c16
Charles R. Anderson 910c16
# Everything is GPLv3+ except:
Charles R. Anderson 910c16
# - Common/pbkdf2/* which is GPLv2+, a bundled copy of some gnulib code.
Charles R. Anderson 910c16
# - Common/Dta*Dump* which is BSD (https://github.com/Drive-Trust-Alliance/sedutil/issues/145)
Charles R. Anderson 910c16
License:	GPLv3+ and GPLv2+ and BSD
Charles R. Anderson 910c16
URL:		https://github.com/Drive-Trust-Alliance/sedutil/wiki
Charles R. Anderson 910c16
Source0:	https://github.com/Drive-Trust-Alliance/%{name}/archive/%{gittag0}/%{name}-%{gittag0}.tar.gz
Charles R. Anderson 910c16
# Make a manual page from the help output:
Charles R. Anderson 910c16
#help2man --name=sedutil-cli \
Charles R. Anderson 910c16
#	 --section=8 \
Charles R. Anderson 910c16
#	 --no-info \
Charles R. Anderson 910c16
#	 --version-string=%%{version} \
Charles R. Anderson 910c16
#	 --no-discard-stderr \
Charles R. Anderson 910c16
#	 --output=./dist/Release_x86_64/GNU-Linux/sedutil-cli.8 \
Charles R. Anderson 910c16
#	 ./dist/Release_x86_64/GNU-Linux/sedutil-cli
Charles R. Anderson 910c16
# Cleaned up with manual edits:
Charles R. Anderson 910c16
Source1:	sedutil-cli.8
Charles R. Anderson a976e1
# Modified version of https://github.com/Drive-Trust-Alliance/sedutil/pull/56.patch
Charles R. Anderson a976e1
# to use linux/nvme_ioctl.h regardless of kernel version number
Charles R. Anderson a976e1
Patch0:		sedutil-1.12-nvme_ioctl.patch
Charles R. Anderson 910c16
Charles R. Anderson 910c16
# sedutil does not work on big-endian architectures
Charles R. Anderson 910c16
ExcludeArch:	ppc ppc64 s390 s390x
Charles R. Anderson 910c16
Charles R. Anderson 910c16
BuildRequires:	ncurses-devel
Charles R. Anderson 910c16
Charles R. Anderson 910c16
# This package uses gnulib. It was granted an exception in:
Charles R. Anderson 910c16
# https://fedorahosted.org/fpc/ticket/174
Charles R. Anderson 910c16
Provides:	bundled(gnulib)
Charles R. Anderson 910c16
Charles R. Anderson 910c16
# Replaces msed, but doesn't provide a compatible CLI command
Charles R. Anderson 910c16
Obsoletes:	msed <= 0.23-0.20
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%description
Charles R. Anderson 910c16
The Drive Trust Alliance software (sedutil) is an Open Source (GPLv3)
Charles R. Anderson 910c16
effort to make Self Encrypting Drive technology freely available to
Charles R. Anderson 910c16
everyone. It is a combination of the two known available Open Source
Charles R. Anderson 910c16
code bases today: msed and OpalTool.
Charles R. Anderson 910c16
Charles R. Anderson 910c16
sedutil is a Self-Encrypting Drive (SED) management program and
Charles R. Anderson 910c16
Pre-Boot Authorization (PBA) image that will allow the activation and
Charles R. Anderson 910c16
use of self encrypting drives that comply with the Trusted Computing
Charles R. Anderson 910c16
Group Opal 2.0 SSC.
Charles R. Anderson 910c16
Charles R. Anderson 910c16
This package provides the sedutil-cli and linuxpba binaries, but not
Charles R. Anderson 910c16
the PBA image itself.
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%prep
Charles R. Anderson 910c16
%setup -q -n sedutil-%{gittag0}
Charles R. Anderson 910c16
%patch0 -p1 -b .nvme_ioctl
Charles R. Anderson 910c16
# Adjust the GitVersion.sh script to just use the git tag from the
Charles R. Anderson 910c16
# checkout so we don't need a full git tree or the git tool itself.
Charles R. Anderson 910c16
cd linux
Charles R. Anderson 910c16
sed -i -e's/^GITVER=.*/GITVER=%{gittag0}/' GitVersion.sh
Charles R. Anderson 910c16
# Remove stray execute permissions from source code
Charles R. Anderson 910c16
find . -type f -name '*.h' -exec chmod -x {} \;
Charles R. Anderson 910c16
find . -type f -name '*.cpp' -exec chmod -x {} \;
Charles R. Anderson 910c16
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%build
Charles R. Anderson 910c16
# Always use the x86_64 build configuration, because we override
Charles R. Anderson 910c16
# CFLAGS etc. for each arch build anyway and the upstream makefiles
Charles R. Anderson 910c16
# don't have build configs for every arch we support.
Charles R. Anderson 910c16
cd linux/CLI
Charles R. Anderson 910c16
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" CONF=Release_x86_64
Charles R. Anderson 910c16
Charles R. Anderson 910c16
# Copy in our manual page
Charles R. Anderson 910c16
cp -p %{SOURCE1} dist/Release_x86_64/GNU-Linux/sedutil-cli.8
Charles R. Anderson 910c16
Charles R. Anderson 910c16
cd ../../LinuxPBA
Charles R. Anderson 910c16
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" CONF=Release
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%install
Charles R. Anderson 910c16
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
Charles R. Anderson 910c16
install -p -m755 linux/CLI/dist/Release_x86_64/GNU-Linux/sedutil-cli $RPM_BUILD_ROOT%{_sbindir}/sedutil-cli
Charles R. Anderson 910c16
Charles R. Anderson 910c16
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
Charles R. Anderson 910c16
install -p -m644 linux/CLI/dist/Release_x86_64/GNU-Linux/sedutil-cli.8 $RPM_BUILD_ROOT%{_mandir}/man8/sedutil-cli.8
Charles R. Anderson 910c16
Charles R. Anderson 910c16
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
Charles R. Anderson 910c16
install -p -m755 LinuxPBA/dist/Release/GNU-Linux/linuxpba $RPM_BUILD_ROOT%{_libexecdir}/linuxpba
Charles R. Anderson 910c16
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%files
Charles R. Anderson 910c16
%doc README.md Common/Copyright.txt Common/ReadMe.txt linux/PSIDRevert_LINUX.txt
Charles R. Anderson 910c16
%license Common/LICENSE.txt
Charles R. Anderson 910c16
%{_sbindir}/sedutil-cli
Charles R. Anderson 910c16
%{_mandir}/man8/sedutil-cli.8*
Charles R. Anderson 910c16
%{_libexecdir}/linuxpba
Charles R. Anderson 910c16
Charles R. Anderson 910c16
Charles R. Anderson 910c16
%changelog
Fedora Release Engineering dd753e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-5
Fedora Release Engineering dd753e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
Fedora Release Engineering dd753e
Charles R. Anderson a976e1
* Tue May 16 2017 Charles R. Anderson <cra@wpi.edu> - 1.12-4
Charles R. Anderson a976e1
- Update patch for epel7 build with older kernel version numbering
Charles R. Anderson a976e1
Charles R. Anderson 910c16
* Tue May  9 2017 Charles R. Anderson <cra@wpi.edu> - 1.12-3
Charles R. Anderson 910c16
- Remove commented out macros
Charles R. Anderson 910c16
- Clarify multiple licensing scenario
Charles R. Anderson 910c16
- Provides: bundled(gnulib)
Charles R. Anderson 910c16
- Move sedutil-cli to /usr/sbin and linuxbpa to /usr/libexec
Charles R. Anderson 910c16
- Provide a manual page for sedutil-cli
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Wed May  3 2017 Charles R. Anderson <cra@wpi.edu> - 1.12-2
Charles R. Anderson 910c16
- Obsolete msed package
Charles R. Anderson 910c16
- Remove stray execute permissions from source code
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Wed May  3 2017 Charles R. Anderson <cra@wpi.edu> - 1.12-1
Charles R. Anderson 910c16
- Use nvme_ioctl.h for newer kernel versions (upstream pull request #56)
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Tue Jan  3 2017 Charles R. Anderson <cra@wpi.edu>
Charles R. Anderson 910c16
- update to 1.12
Charles R. Anderson 910c16
- sedutil-nvme_ioctl_h.patch for renamed linux/nvme.h header
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Wed Nov 11 2015 Charles R. Anderson <cra@wpi.edu> - 1.10-0.1.beta.git350b22c
Charles R. Anderson 910c16
- switch to DriveTrustAlliance/sedutil upstream where all further development
Charles R. Anderson 910c16
  of msed happens now.
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Fri Aug 07 2015 Rafael Fonseca <rdossant@redhat.com> - 0.23-0.7.beta.gite38a16d
Charles R. Anderson 910c16
- disable build on big endian architectures (rhbz#1251520)
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Mon Jul 27 2015 Charles R. Anderson <cra@wpi.edu> - 0.23-0.6.beta.gite38a16d
Charles R. Anderson 910c16
- add comments about upstream pull requests for patches
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Sun Jul 26 2015 Charles R. Anderson <cra@wpi.edu> - 0.23-0.5.beta.gite38a16d
Charles R. Anderson 910c16
- use Github Source0 URL and standard macros for git hash
Charles R. Anderson 910c16
- patch GitVersion.sh to use a static git tag so we do not need a
Charles R. Anderson 910c16
  full git tree or the git tool for building.
Charles R. Anderson 910c16
- preserve timestamps of installed files
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Tue Jul 21 2015 Charles R. Anderson <cra@wpi.edu> - 0.23-0.4.beta.gite38a16d
Charles R. Anderson 910c16
- mark LICENSE.txt as a license text
Charles R. Anderson 910c16
- enable hardened build
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Tue Jul 21 2015 Charles R. Anderson <cra@wpi.edu> - 0.23-0.3.beta.gite38a16d
Charles R. Anderson 910c16
- add more documentation
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Tue Jul 21 2015 Charles R. Anderson <cra@wpi.edu> - 0.23-0.2.beta.gite38a16d
Charles R. Anderson 910c16
- add BR git to properly define GIT_VERSION 
Charles R. Anderson 910c16
Charles R. Anderson 910c16
* Mon Jul 20 2015 Charles R. Anderson <cra@wpi.edu> - 0.23-0.1.beta.gite38a16d
Charles R. Anderson 910c16
- initial package