File sedutil.spec of Package sedutil
#
# spec file for package sedutil
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _dracutmodulesdir %{_prefix}/lib/dracut/modules.d
Name: sedutil
Version: 0.0
Release: 0
Summary: Tools to manage the activation and use of self encrypting drives
License: GPL-3.0-or-later
Group: System/Management
Url: https://github.com/ladar/sedutil/wiki
Source0: %{name}-%{version}.tar.bz2
Source1: module-setup.sh
Source2: linuxpba.sh
Source3: sedutil-pba.pl
Patch1: sedutil-gcc13.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: ncurses-devel
%if 0%{?sle_version} == 150400 || 0%{?sle_version} == 150500 || 0%{?sle_version} == 150600
BuildRequires: gcc11
BuildRequires: gcc11-c++
%else
%if 0%{?suse_version} > 1500
BuildRequires: gcc13
BuildRequires: gcc13-c++
BuildRequires: ghostscript
BuildRequires: time
%else
%if 0%{?suse_version}
BuildRequires: gcc9
BuildRequires: gcc9-c++
%endif
%endif
%endif
Requires: xorriso
Requires: mtools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: x86_64
%description
sedutil is a Self-Encrypting Drive (SED) management program and
Pre-Boot Authorization (PBA) image that will allow the activation and
use of self encrypting drives that comply with the Trusted Computing
Group Opal 2.0 SSC. This is the Ladar fork with support for SHA512 and
multiple users.
This package provides the sedutil-cli and linuxpba binaries, but not
the PBA image itself.
%prep
%setup -q
%if 0%{?suse_version} > 1500
%patch1 -p0
%endif
%build
autoreconf -fi
# use modern compiler on suse
%if 0%{?sle_version} == 150400 || 0%{?sle_version} == 150500 || 0%{?sle_version} == 150600
CC=gcc-11 ; export CC
CXX=g++-11 ; export CXX
%else
%if 0%{?suse_version} > 1500
CC=gcc-13 ; export CC
CXX=g++-13 ; export CXX
%else
%if 0%{?suse_version}
CC=gcc-9 ; export CC
CXX=g++-9 ; export CXX
%endif
%endif
%endif
echo "####"
echo "suse_version = %{suse_version}"
echo "is_opensuse = %{is_opensuse}"
echo "sle_version = %{sle_version}"
export CPPFLAGS='-fPIE'
export LDFLAGS='-pie'
%configure
make all %{?_smp_mflags}
#cd images
#./getresources
#./buildpbaroot
#./buildbios
#./buildUEFI64
#mkdir UEFI64
#mv UEFI64-1.15*.img.gz UEFI64
#./buildrescue Rescue32
#./buildrescue Rescue64
#cd ..
%install
%make_install
install -m 0755 -d %{buildroot}%{_dracutmodulesdir}/00sedutil/
install -m 0755 %{SOURCE1} %{buildroot}%{_dracutmodulesdir}/00sedutil/
install -m 0755 %{SOURCE2} %{buildroot}%{_dracutmodulesdir}/00sedutil/
install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}/
%files
%defattr(-,root,root)
%doc README.md Common/Copyright.txt Common/ReadMe.txt linux/PSIDRevert_LINUX.txt
%license Common/LICENSE.txt
%{_mandir}/man8/sedutil-cli.8*
%{_sbindir}/sedutil-cli
%{_sbindir}/linuxpba
%dir %{_prefix}/lib/dracut
%dir %{_dracutmodulesdir}
%dir %{_dracutmodulesdir}/00sedutil/
%{_dracutmodulesdir}/00sedutil/module-setup.sh
%{_dracutmodulesdir}/00sedutil/linuxpba.sh
%{_sbindir}/sedutil-pba.pl
%changelog
* Wed Aug 19 2020 Callum Farmer <callumjfarmer13@gmail.com>
- Fixes for %%_libexecdir changing to /usr/libexec (bsc#1174075)
* Fri Sep 28 2018 Jan Engelhardt <jengelh@inai.de>
- Remove empty %%post/%%postun.
- Remove redundant marketing paragraph from description.
* Fri Sep 28 2018 mchang@suse.com
- Update source URL
* Mon Nov 20 2017 mchang@suse.com
- Initial version