diff --git a/tpm-tools-1.3.5-fix-for-new-DSO-linking.patch b/tpm-tools-1.3.5-fix-for-new-DSO-linking.patch deleted file mode 100644 index 4393e93..0000000 --- a/tpm-tools-1.3.5-fix-for-new-DSO-linking.patch +++ /dev/null @@ -1,58 +0,0 @@ -Fix build with new DSO linking rules - -tpm_sealdata.o calls functions from libcrypto, but the dependency was not -directly expressed. libtpm_pkcs11 calls functions from libdl. -See http://fedoraproject.org/wiki/UnderstandingDSOLinkChange for details. - -Index: tpm-tools-1.3.5/src/cmds/Makefile.am -=================================================================== ---- tpm-tools-1.3.5.orig/src/cmds/Makefile.am -+++ tpm-tools-1.3.5/src/cmds/Makefile.am -@@ -30,7 +30,7 @@ else - AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX - endif - --LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -+LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto - - tpm_sealdata_SOURCES = tpm_sealdata.c - tpm_unsealdata_SOURCES = tpm_unsealdata.c -Index: tpm-tools-1.3.5/lib/Makefile.am -=================================================================== ---- tpm-tools-1.3.5.orig/lib/Makefile.am -+++ tpm-tools-1.3.5/lib/Makefile.am -@@ -52,7 +52,7 @@ if P11_SUPPORT - noinst_LTLIBRARIES += libtpm_pkcs11.la - - libtpm_pkcs11_la_SOURCES= tpm_pkcs11.c --libtpm_pkcs11_la_LIBADD = libtpm_utils.la -+libtpm_pkcs11_la_LIBADD = libtpm_utils.la -ldl - endif - - # -Index: tpm-tools-1.3.5/lib/Makefile.in -=================================================================== ---- tpm-tools-1.3.5.orig/lib/Makefile.in -+++ tpm-tools-1.3.5/lib/Makefile.in -@@ -297,7 +297,7 @@ libtpm_utils_la_SOURCES = tpm_utils.c \ - libtpm_tspi_la_SOURCES = tpm_tspi.c - libtpm_tspi_la_LIBADD = libtpm_utils.la - @P11_SUPPORT_TRUE@libtpm_pkcs11_la_SOURCES = tpm_pkcs11.c --@P11_SUPPORT_TRUE@libtpm_pkcs11_la_LIBADD = libtpm_utils.la -+@P11_SUPPORT_TRUE@libtpm_pkcs11_la_LIBADD = libtpm_utils.la -ldl - - # - # Installed Libraries -Index: tpm-tools-1.3.5/src/cmds/Makefile.in -=================================================================== ---- tpm-tools-1.3.5.orig/src/cmds/Makefile.in -+++ tpm-tools-1.3.5/src/cmds/Makefile.in -@@ -242,7 +242,7 @@ top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - @TSS_LIB_IS_12_FALSE@AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX - @TSS_LIB_IS_12_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX -DTSS_LIB_IS_12 --LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -+LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto - tpm_sealdata_SOURCES = tpm_sealdata.c - tpm_unsealdata_SOURCES = tpm_unsealdata.c - all: all-am diff --git a/tpm-tools-1.3.7-build.patch b/tpm-tools-1.3.7-build.patch new file mode 100644 index 0000000..6df6c48 --- /dev/null +++ b/tpm-tools-1.3.7-build.patch @@ -0,0 +1,45 @@ +diff -ur ./lib/Makefile.am /home/sgrubb/working/BUILD/tpm-tools/lib/Makefile.am +--- ./lib/Makefile.am 2011-09-19 10:12:49.000000000 -0400 ++++ /home/sgrubb/working/BUILD/tpm-tools/lib/Makefile.am 2011-09-19 10:32:47.000000000 -0400 +@@ -52,7 +52,7 @@ + noinst_LTLIBRARIES += libtpm_pkcs11.la + + libtpm_pkcs11_la_SOURCES= tpm_pkcs11.c +-libtpm_pkcs11_la_LIBADD = libtpm_utils.la ++libtpm_pkcs11_la_LIBADD = libtpm_utils.la -ldl + endif + + # +diff -ur ./lib/tpm_tspi.c /home/sgrubb/working/BUILD/tpm-tools/lib/tpm_tspi.c +--- ./lib/tpm_tspi.c 2011-09-19 10:12:49.000000000 -0400 ++++ /home/sgrubb/working/BUILD/tpm-tools/lib/tpm_tspi.c 2011-09-19 10:26:38.000000000 -0400 +@@ -702,14 +702,14 @@ + unloadNVDataPublic(UINT64 *offset, BYTE *blob, UINT32 blob_len, TPM_NV_DATA_PUBLIC *v) + { + UINT64 off = *offset; +- TSS_RESULT result; +- result = Trspi_UnloadBlob_NV_DATA_PUBLIC(&off, blob, NULL); ++ TSS_RESULT result = TSS_SUCCESS; ++/* result = Trspi_UnloadBlob_NV_DATA_PUBLIC(&off, blob, NULL); + if (result == TSS_SUCCESS) { + if (off > blob_len) + return TSS_E_BAD_PARAMETER; + result = Trspi_UnloadBlob_NV_DATA_PUBLIC(offset, blob, v); + } +- tspiResult("Trspi_UnloadBlob_NV_DATA_PUBLIC", result); ++ tspiResult("Trspi_UnloadBlob_NV_DATA_PUBLIC", result); */ + return result; + } + +diff -ur ./src/tpm_mgmt/Makefile.am /home/sgrubb/working/BUILD/tpm-tools/src/tpm_mgmt/Makefile.am +--- ./src/tpm_mgmt/Makefile.am 2011-09-19 10:12:49.000000000 -0400 ++++ /home/sgrubb/working/BUILD/tpm-tools/src/tpm_mgmt/Makefile.am 2011-09-19 10:23:59.000000000 -0400 +@@ -21,6 +21,8 @@ + # http://www.opensource.org/licenses/cpl1.0.php. + # + ++noinst_HEADERS = tpm_nvcommon.h ++ + noinst_PROGRAMS = tpm_startup \ + tpm_reset + diff --git a/tpm-tools.spec b/tpm-tools.spec index 37c3ebc..0d0cf45 100644 --- a/tpm-tools.spec +++ b/tpm-tools.spec @@ -5,9 +5,11 @@ Release: 1%{?dist} License: CPL Group: Applications/System Source0: http://downloads.sourceforge.net/trousers/%{name}-%{version}.tar.gz -Patch0: tpm-tools-1.3.5-fix-for-new-DSO-linking.patch +Patch0: tpm-tools-1.3.7-header.patch # Package unnecessarily has -Werror and any problem kills the build Patch1: tpm-tools-1.3.5-no-werror.patch +# Package has other flaws preventing proper build +Patch2: tpm-tools-1.3.7-build.patch URL: http://trousers.sourceforge.net BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: trousers-devel openssl-devel opencryptoki-devel @@ -45,6 +47,7 @@ for developing tpm-tools applications. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %configure