- New upstream release 1.3.3.

- No longer needed patch, dropped:
    tpm-tools-conditionally-build-tpmtoken-manpages-Makefile.in.patch
- Use global instead of define for macros.
- Remove rpaths.
- LICENSE file is suddenly missing in upstream tarball.
- Added patch to allow compilation:
    tpm-tools-1.3.3-check-fwrite-success.patch
This commit is contained in:
Michal Schmidt 2009-08-07 14:06:03 +00:00
parent a5eb3fdb6c
commit 53e8df716d
3 changed files with 41 additions and 61 deletions

View File

@ -0,0 +1,21 @@
Upstream uses -Werror and Fedora adds -D_FORTIFY_SOURCE=2, so the return value
from fwrite must be checked.
Patch sent to upstream maintainer Rajiv Andrade on 2009-08-07.
Index: tpm-tools-1.3.3/src/cmds/tpm_unsealdata.c
===================================================================
--- tpm-tools-1.3.3.orig/src/cmds/tpm_unsealdata.c
+++ tpm-tools-1.3.3/src/cmds/tpm_unsealdata.c
@@ -91,7 +91,10 @@ int main(int argc, char **argv)
return rc;
}
- fwrite(tss_data, tss_size, 1, fp);
+ if (fwrite(tss_data, tss_size, 1, fp) != 1) {
+ logError(_("Unable to write output file"));
+ return rc;
+ }
fclose(fp);
free(tss_data);
return rc;

View File

@ -1,54 +0,0 @@
diff -pburN -x 'CVS*' tpm-tools-1.3.1.vanilla/man/man1/Makefile.in tpm-tools-1.3.1/man/man1/Makefile.in
--- tpm-tools-1.3.1.vanilla/man/man1/Makefile.in 2007-11-21 14:20:17.000000000 -0600
+++ tpm-tools-1.3.1/man/man1/Makefile.in 2007-12-13 13:00:50.000000000 -0600
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,6 +59,12 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
+@P11_SUPPORT_TRUE@am__append_1 = tpmtoken_init.1 \
+@P11_SUPPORT_TRUE@ tpmtoken_import.1 \
+@P11_SUPPORT_TRUE@ tpmtoken_objects.1 \
+@P11_SUPPORT_TRUE@ tpmtoken_protect.1 \
+@P11_SUPPORT_TRUE@ tpmtoken_setpasswd.1
+
subdir = man/man1
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -110,6 +116,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
@@ -139,6 +146,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
RANLIB = @RANLIB@
RM = @RM@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -194,14 +202,7 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
-man1_MANS = tpm_sealdata.1 \
- tpm_version.1 \
- tpmtoken_init.1 \
- tpmtoken_import.1 \
- tpmtoken_objects.1 \
- tpmtoken_protect.1 \
- tpmtoken_setpasswd.1
-
+man1_MANS = tpm_sealdata.1 tpm_version.1 $(am__append_1)
EXTRA_DIST = $(man1_MANS)
all: all-am

View File

@ -1,6 +1,7 @@
%define name tpm-tools
%define version 1.3.1
%define release 10
%global name tpm-tools
%global version 1.3.3
%global tarballrev -1
%global release 1
Name: %{name}
Summary: Management tools for the TPM hardware
@ -8,11 +9,11 @@ Version: %{version}
Release: %{release}%{?dist}
License: CPL
Group: Applications/System
Source0: http://downloads.sourceforge.net/trousers/%{name}-%{version}.tar.gz
Source0: http://downloads.sourceforge.net/trousers/%{name}-%{version}%{tarballrev}.tar.gz
Patch0: %{name}-1.3.3-check-fwrite-success.patch
URL: http://trousers.sourceforge.net
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: trousers-devel openssl-devel opencryptoki-devel
Patch0: tpm-tools-conditionally-build-tpmtoken-manpages-Makefile.in.patch
%description
tpm-tools is a group of tools to manage and utilize the Trusted Computing
@ -46,7 +47,9 @@ for developing tpm-tools applications.
%patch0 -p1
%build
%configure
%configure --disable-rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
@ -64,7 +67,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE README
%doc README
%attr(755, root, root) %{_bindir}/tpm_*
%attr(755, root, root) %{_sbindir}/tpm_*
%attr(755, root, root) %{_libdir}/libtpm_unseal.so.?.?.?
@ -84,6 +87,16 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/tpmUnseal*
%changelog
* Fri Aug 07 2009 Michal Schmidt <mschmidt@redhat.com> 1.3.3-1
- New upstream release 1.3.3.
- No longer needed patch, dropped:
tpm-tools-conditionally-build-tpmtoken-manpages-Makefile.in.patch
- Use global instead of define for macros.
- Remove rpaths.
- LICENSE file is suddenly missing in upstream tarball.
- Added patch to allow compilation:
tpm-tools-1.3.3-check-fwrite-success.patch
* Wed Jul 29 2009 Michal Schmidt <mschmidt@redhat.com> 1.3.1-10
- Split the pkcs11 utilities into a subpackage.