2017-02-01 07:51:27 +01:00
|
|
|
#
|
|
|
|
# spec file for package ibmtss
|
|
|
|
#
|
2017-11-09 15:07:29 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-02-01 07:51:27 +01:00
|
|
|
#
|
|
|
|
# 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 http://bugs.opensuse.org/
|
2017-02-08 10:06:54 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-02-01 07:51:27 +01:00
|
|
|
#
|
|
|
|
%define suite ibmtss
|
|
|
|
|
|
|
|
Name: ibmtss
|
2017-11-09 15:07:29 +01:00
|
|
|
Version: 1045
|
2017-02-08 10:06:54 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: IBM's TPM 2.0 TSS
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Security
|
2017-11-09 15:07:29 +01:00
|
|
|
Url: https://sourceforge.net/projects/ibmtpm20tss
|
|
|
|
Source: https://sourceforge.net/projects/ibmtpm20tss/files/ibmtss%{version}.tar.gz
|
|
|
|
Patch: makefile.patch
|
2017-02-08 10:06:54 +01:00
|
|
|
Source1: %{name}
|
|
|
|
Source2: %{name}.1
|
2017-11-09 15:07:29 +01:00
|
|
|
BuildRequires: libopenssl-devel
|
2017-02-01 07:51:27 +01:00
|
|
|
%ifnarch s390x s390 ppc64 ppc
|
2017-02-08 10:06:54 +01:00
|
|
|
BuildRequires: ibmswtpm2
|
2017-02-01 07:51:27 +01:00
|
|
|
%define test 1
|
|
|
|
%else
|
|
|
|
%define test ""
|
|
|
|
%endif
|
2017-02-08 10:06:54 +01:00
|
|
|
Recommends: %{name}-base = %{version}
|
2017-02-01 07:51:27 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2017-02-09 14:06:57 +01:00
|
|
|
This is a user space TCG Software Stack (TSS) for TPM 2.0. It
|
|
|
|
implements the functionality equivalent to the TCG TSS working
|
|
|
|
group's planned ESAPI, SAPI, and TCTI APIs.
|
2017-02-01 07:51:27 +01:00
|
|
|
|
2017-02-09 14:06:57 +01:00
|
|
|
It comes with over 100 "TPM tools" that can be used for scripted
|
|
|
|
apps, rapid prototyping, education, and debugging.
|
|
|
|
|
|
|
|
%package base
|
|
|
|
Summary: IBM's TPM 2.0 TSS shared files
|
|
|
|
Group: Productivity/Security
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description base
|
|
|
|
Includes IBM's TPM 2.0 TSS certificates and policy files.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: IBM's TPM 2.0 TSS headers
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{suite} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
2017-03-07 16:36:52 +01:00
|
|
|
Includes IBM's TPM 2.0 TSS C header files
|
2017-02-01 07:51:27 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -c -q
|
2017-11-09 15:07:29 +01:00
|
|
|
%patch -p 1
|
2017-02-01 07:51:27 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd utils
|
|
|
|
[ -n "%{test}" ] && { %{_libexecdir}/%{suite}/tpm_server & tpm_server="$!" ; }
|
|
|
|
CCFLAGS="%{optflags}" make LNAFLAGS="-Wl,-rpath,%{_libexecdir}/%{suite}" %{?_smp_mflags}
|
2017-02-09 14:06:57 +01:00
|
|
|
testfailed=0
|
2017-02-01 07:51:27 +01:00
|
|
|
[ -n "%{test}" ] && { TPM_INTERFACE_TYPE=socsim LD_LIBRARY_PATH=. ./reg.sh || testfailed=$? ; }
|
|
|
|
[ -n "%{test}" ] && kill "$tpm_server" || :
|
2017-02-09 14:06:57 +01:00
|
|
|
[ "$testfailed" -eq 0 ]
|
2017-02-01 07:51:27 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
cd utils
|
|
|
|
install -m 755 -D -t %{buildroot}/%{_libexecdir}/%{suite} libtss.so
|
2017-11-09 15:07:29 +01:00
|
|
|
install -m 755 -D -t %{buildroot}/%{_libexecdir}/%{suite} \
|
|
|
|
activatecredential eventextend imaextend certify certifycreation changeeps changepps clear clearcontrol clockrateadjust clockset commit contextload contextsave create createloaded createprimary dictionaryattacklockreset dictionaryattackparameters duplicate eccparameters ecephemeral encryptdecrypt eventsequencecomplete evictcontrol flushcontext getcommandauditdigest getcapability getrandom getsessionauditdigest gettime hashsequencestart hash hierarchycontrol hierarchychangeauth hmac hmacstart import importpem load loadexternal makecredential nvcertify nvchangeauth nvdefinespace nvextend nvglobalwritelock nvincrement nvread nvreadlock nvreadpublic nvsetbits nvundefinespace nvundefinespacespecial nvwrite nvwritelock objectchangeauth pcrallocate pcrevent pcrextend pcrread pcrreset policyauthorize policyauthvalue policycommandcode policycphash policycountertimer policygetdigest policymaker policymakerpcr policyauthorizenv policynv policynvwritten policyor policypassword policypcr policyrestart policysigned policysecret policytemplate policyticket quote powerup readclock readpublic returncode rewrap rsadecrypt rsaencrypt sequenceupdate sequencecomplete setprimarypolicy shutdown sign startauthsession startup stirrandom unseal verifysignature signapp writeapp timepacket createek ntc2getconfig ntc2preconfig ntc2lockconfig
|
2017-02-01 07:51:27 +01:00
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{suite}
|
|
|
|
cp -a policies certificates %{buildroot}/%{_datadir}/%{suite}
|
|
|
|
mkdir -p %{buildroot}/%{_includedir}/%{suite}
|
|
|
|
cp -a tss2 *.h %{buildroot}/%{_includedir}/%{suite}
|
|
|
|
install -p -D -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/%{suite}
|
|
|
|
install -p -D -m 644 %{SOURCE1}.1 %{buildroot}/%{_mandir}/man1/%{suite}.1
|
|
|
|
sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{suite},g -e s,%DOCDIR%,%{_docdir}/%{name},g \
|
|
|
|
%{buildroot}/%{_bindir}/%{suite} %{buildroot}/%{_mandir}/man1/%{suite}.1
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc ibmtss.doc LICENSE
|
|
|
|
%{_libexecdir}/%{suite}
|
|
|
|
%{_bindir}/%{suite}
|
|
|
|
%{_mandir}/man1/%{suite}.1*
|
|
|
|
|
|
|
|
%files base
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE
|
|
|
|
%{_datadir}/%{suite}
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE
|
|
|
|
%{_includedir}/%{suite}
|
|
|
|
|
2017-02-08 10:06:54 +01:00
|
|
|
%changelog
|