From e21667dab8f6fe0163042f440dab737eb326af25 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Wed, 30 Jan 2013 14:50:25 -0500 Subject: [PATCH] Upgrade to latest upstream version (#902653) --- .gitignore | 1 + sources | 2 +- tboot-1.7.0-zlib-fix.patch | 42 --------------------------------- tboot-1.7.3-format-string.patch | 21 +++++++++++++++++ tboot.spec | 36 ++++++++++++++++++++-------- 5 files changed, 49 insertions(+), 53 deletions(-) delete mode 100644 tboot-1.7.0-zlib-fix.patch create mode 100644 tboot-1.7.3-format-string.patch diff --git a/.gitignore b/.gitignore index f49e03a..8715fd6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /tboot-1.5.0.tar.gz /tboot-20110429.tar.gz /tboot-1.7.0.tar.gz +/tboot-1.7.3.tar.gz diff --git a/sources b/sources index bed4959..51971f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -718ac20a74b66c1dd353af4b3d931a05 tboot-1.7.0.tar.gz +bc7ec3bdd71b21fb73368f24bf697739 tboot-1.7.3.tar.gz diff --git a/tboot-1.7.0-zlib-fix.patch b/tboot-1.7.0-zlib-fix.patch deleted file mode 100644 index bac03aa..0000000 --- a/tboot-1.7.0-zlib-fix.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -r 7db3c64d7b75 lcptools/mlehash.c ---- a/lcptools/mlehash.c Wed Aug 22 11:49:46 2012 +0800 -+++ b/lcptools/mlehash.c Wed Aug 22 12:14:03 2012 +0800 -@@ -233,7 +233,7 @@ - */ - static bool read_file(const char *filename, void **buffer, size_t *length) - { -- FILE *fcompressed = NULL; -+ gzFile fcompressed = NULL; - FILE *fdecompressed = NULL; - struct stat filestat; - char tmpbuffer[1024]; -diff -r 7db3c64d7b75 tb_polgen/commands.c ---- a/tb_polgen/commands.c Wed Aug 22 11:49:46 2012 +0800 -+++ b/tb_polgen/commands.c Wed Aug 22 12:14:03 2012 +0800 -@@ -60,7 +60,7 @@ - int read_cnt; - - if ( unzip ) -- f = gzopen(filename, "rb"); -+ f = (FILE *)gzopen(filename, "rb"); - else - f = fopen(filename, "rb"); - -@@ -73,7 +73,7 @@ - EVP_DigestInit(&ctx, md); - do { - if ( unzip ) -- read_cnt = gzread(f, buf, sizeof(buf)); -+ read_cnt = gzread((gzFile)f, buf, sizeof(buf)); - else - read_cnt = fread(buf, 1, sizeof(buf), f); - if ( read_cnt == 0 ) -@@ -84,7 +84,7 @@ - EVP_DigestFinal(&ctx, hash->sha1, NULL); - - if ( unzip ) -- gzclose(f); -+ gzclose((gzFile)f); - else - fclose(f); - diff --git a/tboot-1.7.3-format-string.patch b/tboot-1.7.3-format-string.patch new file mode 100644 index 0000000..a6474a8 --- /dev/null +++ b/tboot-1.7.3-format-string.patch @@ -0,0 +1,21 @@ +diff -up tboot-1.7.3/tb_polgen/param.c.orig tboot-1.7.3/tb_polgen/param.c +--- tboot-1.7.3/tb_polgen/param.c.orig 2012-12-28 01:30:13.000000000 -0500 ++++ tboot-1.7.3/tb_polgen/param.c 2013-01-30 14:34:03.696709545 -0500 +@@ -184,7 +184,7 @@ void print_params(param_data_t *params) + info_msg("\t pcr = %d\n", params->pcr); + info_msg("\t hash_type = %d\n", params->hash_type); + info_msg("\t pos = %d\n", params->pos); +- info_msg("\t cmdline length = %lu\n", strlen(params->cmdline)); ++ info_msg("\t cmdline length = %u\n", strlen(params->cmdline)); + info_msg("\t cmdline = %s\n", params->cmdline); + info_msg("\t image_file = %s\n", params->image_file); + info_msg("\t elt_file = %s\n", params->elt_file); +@@ -409,7 +409,7 @@ bool parse_input_params(int argc, char * + return false; + } + if (strlen(optarg) > sizeof(params->cmdline) - 1) { +- error_msg("Command line length of %lu exceeds %d " ++ error_msg("Command line length of %u exceeds %d " + "character maximum\n", + strlen(optarg), TBOOT_KERNEL_CMDLINE_SIZE-1); + return false; diff --git a/tboot.spec b/tboot.spec index 0639d89..0f0eda3 100644 --- a/tboot.spec +++ b/tboot.spec @@ -1,21 +1,20 @@ Summary: Performs a verified launch using Intel TXT Name: tboot -Version: 1.7.0 -Release: 2%{?dist} +Version: 1.7.3 +Release: 1%{?dist} Epoch: 1 - Group: System Environment/Base License: BSD URL: http://sourceforge.net/projects/tboot/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Patch0: tboot-1.7.0-zlib-fix.patch +Patch0: tboot-1.7.3-format-string.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: trousers-devel openssl-devel +BuildRequires: trousers-devel +BuildRequires: openssl-devel ExclusiveArch: %{ix86} x86_64 - %description Trusted Boot (tboot) is an open source, pre-kernel/VMM module that uses Intel Trusted Execution Technology (Intel TXT) to perform a measured @@ -23,13 +22,16 @@ and verified launch of an OS kernel/VMM. %prep %setup -q -%patch0 -p1 -b .zlib-fix + +# Patch format strings only on 32-bit x86 builds. size_t +%ifarch %{ix86} +%patch0 -p1 +%endif %build CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS make debug=y %{?_smp_mflags} - %install rm -rf $RPM_BUILD_ROOT make debug=y DISTDIR=$RPM_BUILD_ROOT install @@ -37,10 +39,11 @@ make debug=y DISTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root,-) %doc README COPYING docs/* lcptools/lcptools2.txt lcptools/Linux_LCP_Tools_User_Manual.pdf +%config %{_sysconfdir}/grub.d/20_linux_tboot +%config %{_sysconfdir}/grub.d/20_linux_xen_tboot %{_sbindir}/acminfo %{_sbindir}/lcp_crtpconf %{_sbindir}/lcp_crtpol @@ -57,11 +60,24 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/tpmnv_lock %{_sbindir}/tpmnv_relindex %{_sbindir}/txt-stat +%{_mandir}/man8/acminfo.8.gz +%{_mandir}/man8/lcp_crtpconf.8.gz +%{_mandir}/man8/lcp_crtpol.8.gz +%{_mandir}/man8/lcp_crtpol2.8.gz +%{_mandir}/man8/lcp_crtpolelt.8.gz +%{_mandir}/man8/lcp_crtpollist.8.gz +%{_mandir}/man8/lcp_mlehash.8.gz +%{_mandir}/man8/lcp_readpol.8.gz +%{_mandir}/man8/lcp_writepol.8.gz +%{_mandir}/man8/tb_polgen.8.gz +%{_mandir}/man8/txt-stat.8.gz /boot/tboot.gz /boot/tboot-syms - %changelog +* Wed Jan 30 2013 David Cantrell - 1:1.7.3-1 +- Upgrade to latest upstream version (#902653) + * Wed Aug 22 2012 Gang Wei - 1:1.7.0-2 - Fix build error with zlib 1.2.7