tpm-tools: 1.3.8 -> 1.3.9.1, fixes build

This commit is contained in:
Tuomas Tynkkynen 2017-09-04 19:12:45 +03:00
parent e6a83ed89c
commit 5f8e6a4fe1
2 changed files with 6 additions and 35 deletions

View file

@ -1,30 +0,0 @@
Title: Fix boolean comparison error (and FTBFS with gcc-5)
Date: 2015-06-28
Author: Pierre Chifflier <pollux@debian.org>
Bug-Debian: http://bugs.debian.org/778147
Index: tpm-tools/src/tpm_mgmt/tpm_nvcommon.c
===================================================================
--- tpm-tools.orig/src/tpm_mgmt/tpm_nvcommon.c
+++ tpm-tools/src/tpm_mgmt/tpm_nvcommon.c
@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA
aArg);
return -1;
}
- if (!aArg[offset+numbytes] == '|' &&
- !aArg[offset+numbytes] == 0) {
+ if (!(aArg[offset+numbytes] == '|' ||
+ aArg[offset+numbytes] == 0)) {
logError(_("Illegal character following "
"hexadecimal number in %s\n"),
aArg + offset);
@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA
return -1;
}
- if (!aArg[offset+numbytes] == '|' &&
- !aArg[offset+numbytes] == 0) {
+ if (!(aArg[offset+numbytes] == '|' ||
+ aArg[offset+numbytes] == 0)) {
logError(_("Illegal character following decimal "
"number in %s\n"),
aArg + offset);

View file

@ -1,19 +1,20 @@
{ stdenv, fetchurl, trousers, openssl, opencryptoki }:
{ stdenv, fetchurl, trousers, openssl, opencryptoki, perl }:
let
version = "1.3.8";
version = "1.3.9.1";
in
stdenv.mkDerivation rec {
name = "tpm-tools-${version}";
src = fetchurl {
url = "mirror://sourceforge/trousers/tpm-tools/${version}/${name}.tar.gz";
sha256 = "10za1gi89vi9m2lmm7jfzs281h55x1sbbm2bdgdh692ljpq4zsv6";
sha256 = "0s7srgghykxnlb1g4izabzf2gfb1knxc0nzn6bly49h8cpi19dww";
};
buildInputs = [ trousers openssl opencryptoki ];
sourceRoot = ".";
patches = [ ./03-fix-bool-error-parseStringWithValues.patch ];
nativeBuildInputs = [ perl ];
buildInputs = [ trousers openssl opencryptoki ];
meta = with stdenv.lib; {
description = "Management tools for TPM hardware";