This patch fixes various issues in the tpm-tools project for being able to build an rpm using the tpm-tools-nopkcs11 spec file.
Signed-off-by: Stefan Berger <[email protected]> --- configure.in | 1 dist/tpm-tools-nopkcs11.spec | 71 ---------------------------------------- dist/tpm-tools-nopkcs11.spec.in | 71 ++++++++++++++++++++++++++++++++++++++++ src/data_mgmt/Makefile.am | 2 - src/tpm_mgmt/Makefile.am | 2 + 5 files changed, 75 insertions(+), 72 deletions(-) Index: tpm-tools/src/tpm_mgmt/Makefile.am =================================================================== --- tpm-tools.orig/src/tpm_mgmt/Makefile.am +++ tpm-tools/src/tpm_mgmt/Makefile.am @@ -21,6 +21,8 @@ # http://www.opensource.org/licenses/cpl1.0.php. # +noinst_HEADERS = tpm_nvcommon.h + noinst_PROGRAMS = tpm_startup \ tpm_reset Index: tpm-tools/src/data_mgmt/Makefile.am =================================================================== --- tpm-tools.orig/src/data_mgmt/Makefile.am +++ tpm-tools/src/data_mgmt/Makefile.am @@ -38,7 +38,7 @@ noinst_HEADERS = data_common.h \ # Common build flags AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX -LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi +LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl # Index: tpm-tools/configure.in =================================================================== --- tpm-tools.orig/configure.in +++ tpm-tools/configure.in @@ -150,6 +150,7 @@ AC_CONFIG_FILES(./Makefile \ src/cmds/Makefile \ src/data_mgmt/Makefile \ dist/tpm-tools.spec \ + dist/tpm-tools-nopkcs11.spec \ man/Makefile \ man/man1/Makefile \ man/man3/Makefile \ Index: tpm-tools/dist/tpm-tools-nopkcs11.spec =================================================================== --- tpm-tools.orig/dist/tpm-tools-nopkcs11.spec +++ /dev/null @@ -1,71 +0,0 @@ -Name: tpm-tools -Version: 1.2.4 -Release: 1 -Summary: Management tools for the TPM hardware - -Group: Applications/System -License: CPL -URL: http://www.sf.net/projects/trousers -Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: autoconf automake libtool trousers-devel openssl-devel perl -Requires: trousers - -%description -tpm-tools is a group of tools to manage and utilize the Trusted Computing -Group's TPM hardware. TPM hardware can create, store and use RSA keys -securely (without ever being exposed in memory), verify a platform's -software state using cryptographic hashes and more. - -%package devel -Summary: Files to use the library routines supplied with tpm-tools -Group: Development/Libraries -Requires: tpm-tools = %{version}-%{release} - -%description devel -tpm-tools-devel is a package that contains the libraries and headers -necessary for developing tpm-tools applications. - - -%prep -%setup -q - - -%build -autoreconf --force --install -%configure --disable-static --disable-pkcs11-support -make - - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT/%{_libdir}/libtpm_unseal.la - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc LICENSE README -%attr(755, root, root) %{_bindir}/tpm_* -%attr(755, root, root) %{_sbindir}/tpm_* -%attr(755, root, root) %{_libdir}/libtpm_unseal.so.0.0.1 -%{_libdir}/libtpm_unseal.so.0 -%{_mandir}/man1/tpm_* -%{_mandir}/man8/tpm_* - -%files devel -%defattr(-,root,root,-) -%{_libdir}/libtpm_unseal.so -%{_includedir}/tpm_tools/*.h -%{_mandir}/man3/tpmUnseal* - - -%post -p /sbin/ldconfig - - -%postun -p /sbin/ldconfig Index: tpm-tools/dist/tpm-tools-nopkcs11.spec.in =================================================================== --- /dev/null +++ tpm-tools/dist/tpm-tools-nopkcs11.spec.in @@ -0,0 +1,71 @@ +Name: @PACKAGE@ +Version: @VERSION@ +Release: 1 +Summary: Management tools for the TPM hardware + +Group: Applications/System +License: CPL +URL: http://www.sf.net/projects/trousers +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: autoconf automake libtool trousers-devel openssl-devel perl +Requires: trousers + +%description +tpm-tools is a group of tools to manage and utilize the Trusted Computing +Group's TPM hardware. TPM hardware can create, store and use RSA keys +securely (without ever being exposed in memory), verify a platform's +software state using cryptographic hashes and more. + +%package devel +Summary: Files to use the library routines supplied with tpm-tools +Group: Development/Libraries +Requires: tpm-tools = %{version}-%{release} + +%description devel +tpm-tools-devel is a package that contains the libraries and headers +necessary for developing tpm-tools applications. + + +%prep +%setup -q + + +%build +autoreconf --force --install +%configure --disable-static --disable-pkcs11-support --libdir=%{_libdir} +make + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT/%{_libdir}/libtpm_unseal.la + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE README +%attr(755, root, root) %{_bindir}/tpm_* +%attr(755, root, root) %{_sbindir}/tpm_* +%attr(755, root, root) %{_libdir}/libtpm_unseal.so.1.0.0 +%{_libdir}/libtpm_unseal.so.1 +%{_mandir}/man1/tpm_* +%{_mandir}/man8/tpm_* + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libtpm_unseal.so +%{_includedir}/tpm_tools/*.h +%{_mandir}/man3/tpmUnseal* + + +%post -p /sbin/ldconfig + + +%postun -p /sbin/ldconfig ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ TrouSerS-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/trousers-tech
