Accepting request 713488 from home:michals

- Update to v1047
  - now supports autotools
  - supports library versioning
  - installs tools with program prefx
 - remove binary tool wrapper
 - remove makefile.patch

OBS-URL: https://build.opensuse.org/request/show/713488
OBS-URL: https://build.opensuse.org/package/show/security/ibmtss?expand=0&rev=21
This commit is contained in:
Marcus Meissner 2019-07-07 13:41:31 +00:00 committed by Git OBS Bridge
parent e7d34b8b00
commit 78d2b6937c
7 changed files with 37 additions and 116 deletions

43
ibmtss
View File

@ -1,43 +0,0 @@
#!/bin/bash
function usage() {
echo Usage: "$1" "<command>" "<arguments>"
echo -e "\thelp" "\t\tprint this help"
echo -e "\tlist" "\t\tlist commands"
echo -e "\t<command> -h" "\tdisplay command help"
}
function do_exec() {
self="$1"
shift
case "$1" in
help|""|*.*|*/*) usage "$self"
return 1
;;
list) find %UTILDIR% -maxdepth 1 -type f -a -executable -a -printf "%P\n" | grep -vF . | sort | tr '\n' ' '
echo
return 0
;;
*) if [ -x "%UTILDIR%/$1" ] ; then
%UTILDIR%/"$@"
return $?
else
echo Unknown command "$1"
return 1
fi
;;
esac
}
if [ "$#" -eq 0 ] ; then
while read -e -p "ibmtss> " -a line ; do
if [ "${#line[@]}" -gt 0 ] ; then
do_exec "" "${line[@]}"
fi
done
echo
else
do_exec $0 "$@"
exit $?
fi

View File

@ -1,24 +0,0 @@
.TH IBMTSS 2.0 utilities \" -*- nroff -*-
.SH NAME
ibmtss \- call an IBM TSS 2.0 utility function
.SH SYNOPSIS
.B ibmtss [command [arguments]]
.SH DESCRIPTION
.B ibmtss
includes over 100 subcommands.
.PP
To list avaialble command use the
.B list
command.
.PP
To obtain command help use the
.B -h
argument.
.PP
Run without a command to start a basic shell in which commands can be entered.
.PP
Accompanying certificates and policy files are available in
.B %DATADIR%
.SH "SEE ALSO"
The documentation provided with the package is available in
%DOCDIR%/ibmtss.doc

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jul 4 16:51:35 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- Update to v1047
- now supports autotools
- supports library versioning
- installs tools with program prefx
- remove binary tool wrapper
- remove makefile.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 22 10:18:35 UTC 2018 - msuchanek@suse.com Tue May 22 10:18:35 UTC 2018 - msuchanek@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package ibmtss # spec file for package ibmtss
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,30 +12,30 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# #
%define suite ibmtss %define suite ibmtss
%define libversion 0 %define libversion 0
%define libname libtss %define libversion_full 0.0.1
%define libname libibmtss
%define libpkgname %{libname}%{libversion} %define libpkgname %{libname}%{libversion}
%define soname %{libname}.so.%{libversion}
Name: ibmtss Name: ibmtss
Version: 1045 Version: 1470
Release: 0 Release: 0
Summary: IBM's TPM 2.0 TSS Summary: IBM's TPM 2.0 TSS
License: BSD-3-Clause License: BSD-3-Clause
Group: Productivity/Security Group: Productivity/Security
URL: https://sourceforge.net/projects/ibmtpm20tss URL: https://sourceforge.net/projects/ibmtpm20tss
Source: https://sourceforge.net/projects/ibmtpm20tss/files/ibmtss%{version}.tar.gz Source: https://sourceforge.net/projects/ibmtpm20tss/files/ibmtss%{version}.tar.gz
Source1: %{name} BuildRequires: autoconf
Source2: %{name}.1 BuildRequires: automake
Patch: makefile.patch
BuildRequires: ibmswtpm2 BuildRequires: ibmswtpm2
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: libtool
Recommends: %{name}-base = %{version} Recommends: %{name}-base = %{version}
%description %description
@ -72,31 +72,29 @@ Includes IBM's TPM 2.0 TSS C header files
%prep %prep
%setup -q -c %setup -q -c
%patch -p 1
%build %build
autoreconf -i
%configure --enable-hwtpm --enable-debug
cd utils cd utils
%{_libexecdir}/%{suite}/tpm_server & tpm_server="$!" %{_libexecdir}/%{suite}/tpm_server & tpm_server="$!"
CCFLAGS="%{optflags}" make LNAFLAGS="-Wl,-rpath,%{_libdir}" %{?_smp_mflags} CCFLAGS="%{optflags}" make LNAFLAGS="-Wl,-rpath,%{_libdir}" %{?_smp_mflags}
testfailed=0 testfailed=0
TPM_INTERFACE_TYPE=socsim LD_LIBRARY_PATH=. ./reg.sh || testfailed=$? TPM_INTERFACE_TYPE=socsim LD_LIBRARY_PATH=.libs ./reg.sh || testfailed=$?
kill "$tpm_server" || : kill "$tpm_server" || :
[ "$testfailed" -eq 0 ] [ "$testfailed" -eq 0 ]
%install %install
cd utils cd utils
install -m 755 -D -t %{buildroot}/%{_libdir} %{soname} %make_install
ln -s %{soname} %{buildroot}/%{_libdir}/%{libname}.so
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
mkdir -p %{buildroot}/%{_datadir}/%{suite} mkdir -p %{buildroot}/%{_datadir}/%{suite}
cp -a policies certificates %{buildroot}/%{_datadir}/%{suite} cp -a policies certificates %{buildroot}/%{_datadir}/%{suite}
mkdir -p %{buildroot}/%{_includedir}/%{suite} mkdir -p %{buildroot}/%{_includedir}/%{suite}
cp -a tss2 *.h %{buildroot}/%{_includedir}/%{suite} cp -a ibmtss *.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 for i in %{buildroot}/%{_mandir}/man1/tsstss*.1 ; do
sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{suite},g -e s,%DOCDIR%,%{_docdir}/%{name},g \ mv -v $i $(echo $i | sed -e s,/tsstss,/tss,)
%{buildroot}/%{_bindir}/%{suite} %{buildroot}/%{_mandir}/man1/%{suite}.1 done
%post -n %{libpkgname} -p /sbin/ldconfig %post -n %{libpkgname} -p /sbin/ldconfig
%postun -n %{libpkgname} -p /sbin/ldconfig %postun -n %{libpkgname} -p /sbin/ldconfig
@ -104,12 +102,12 @@ sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{sui
%files %files
%license LICENSE %license LICENSE
%doc ibmtss.doc %doc ibmtss.doc
%{_libexecdir}/%{suite} %{_bindir}/tss*
%{_bindir}/%{suite} %{_mandir}/man1/tss*.1%{?ext_man}
%{_mandir}/man1/%{suite}.1%{?ext_man}
%files -n %{libpkgname} %files -n %{libpkgname}
%{_libdir}/%{soname} %{_libdir}/%{libname}*.so.%{libversion_full}
%{_libdir}/%{libname}*.so.%{libversion}
%files base %files base
%license LICENSE %license LICENSE
@ -118,6 +116,8 @@ sed -i -e s,%UTILDIR%,%{_libexecdir}/%{suite},g -e s,%DATADIR%,%{_datadir}/%{sui
%files devel %files devel
%license LICENSE %license LICENSE
%{_includedir}/%{suite} %{_includedir}/%{suite}
%{_libdir}/%{libname}.so %{_libdir}/%{libname}*.a
%{_libdir}/%{libname}*.la
%{_libdir}/%{libname}*.so
%changelog %changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6cb9ff5feccd11769dedf609717687b4f94c48d9227265b0b6eedbb1ad16a020
size 625952

3
ibmtss1470.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9a446f4d664d9efcd195fafcfe9e387e4a0cce9e508db19433c34e9f0bcea6c9
size 977556

View File

@ -1,22 +0,0 @@
--- ibmtss-1045/utils/makefile 2017-07-17 21:52:31.000000000 +0200
+++ ibmtss-1045/utils/makefile 2017-11-08 15:45:41.458998485 +0100
@@ -44,7 +44,7 @@
# compile - common flags for TSS library and applications
-CCFLAGS += -DTPM_POSIX
+CCFLAGS += -DTPM_POSIX -DTPM_INTERFACE_TYPE_DEFAULT="\"dev\""
# example of pointing to a locally built openssl 1.1
# CCFLAGS += -I/home/kgold/openssl-1.1.0c/include
--- ibmtss-996/utils/makefile-common 2017-04-19 21:22:21.000000000 +0200
+++ ibmtss-996/utils/makefile-common 2017-06-08 15:47:04.771866677 +0200
@@ -44,7 +44,7 @@
CCFLAGS += \
-Wall -W -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
-Wformat=2 -Wold-style-definition \
- -ggdb -O0 -c
+ -ggdb -fno-strict-aliasing -c
# to compile with optimizations on (warning will result)
# -O3 -c