updated patch which renames the library Depends to the current naming

diff -Nru tpm2-initramfs-tool-0.2.1/debian/changelog tpm2-initramfs-tool-0.2.1/debian/changelog
--- tpm2-initramfs-tool-0.2.1/debian/changelog	2019-10-21 08:53:17.000000000 +0200
+++ tpm2-initramfs-tool-0.2.1/debian/changelog	2020-11-26 20:47:02.000000000 +0100
@@ -1,3 +1,13 @@
+tpm2-initramfs-tool (0.2.1-5) unstable; urgency=medium
+
+  * debian/control.in:
+    - Depends on the new libtss2-esys-3.0.2-0 library naming
+  * debian/patches/git_gcc10_build.patch:
+    - cherry pick an upstream patch to fix the build with gcc10
+      (Closes: #957881)
+
+ -- Sebastien Bacher <seb...@ubuntu.com>  Thu, 26 Nov 2020 20:47:02 +0100
+
 tpm2-initramfs-tool (0.2.1-4) unstable; urgency=medium
 
   * Bump version for debian source package upload.
diff -Nru tpm2-initramfs-tool-0.2.1/debian/control tpm2-initramfs-tool-0.2.1/debian/control
--- tpm2-initramfs-tool-0.2.1/debian/control	2019-09-04 13:56:35.000000000 +0200
+++ tpm2-initramfs-tool-0.2.1/debian/control	2020-11-26 20:47:02.000000000 +0100
@@ -19,7 +19,7 @@
 Architecture: linux-any
 Depends: ${misc:Depends},
          ${shlibs:Depends},
-         libtss2-esys0 (>= 2.1.0-4)
+         libtss2-esys-3.0.2-0 (>= 2.1.0-4)
 Description: Tool used in initramfs to seal/unseal FDE key to the TPM
  This package provides the TPM tool used by the initramfs. 
  Its purpose is to generate/seal/unseal the FDE encrypytion key into 
diff -Nru tpm2-initramfs-tool-0.2.1/debian/patches/git_gcc10_build.patch tpm2-initramfs-tool-0.2.1/debian/patches/git_gcc10_build.patch
--- tpm2-initramfs-tool-0.2.1/debian/patches/git_gcc10_build.patch	1970-01-01 01:00:00.000000000 +0100
+++ tpm2-initramfs-tool-0.2.1/debian/patches/git_gcc10_build.patch	2020-11-26 20:46:38.000000000 +0100
@@ -0,0 +1,58 @@
+From 263cd96f4597e91ed6d586e5b2dd24f2f44f3452 Mon Sep 17 00:00:00 2001
+From: Tim Chen <tim.chen...@canonical.com>
+Date: Mon, 1 Jun 2020 10:54:56 +0800
+Subject: [PATCH] Fix gcc10 errors
+
+---
+ include/tpm2-initramfs-tool.h | 12 ++++++++----
+ src/libtpm2-initramfs-tool.c  |  3 +++
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/include/tpm2-initramfs-tool.h b/include/tpm2-initramfs-tool.h
+index d8260f8..46ce4c4 100644
+--- a/include/tpm2-initramfs-tool.h
++++ b/include/tpm2-initramfs-tool.h
+@@ -131,7 +131,7 @@ extern const char *help;
+ extern const char *optstr;
+ extern const struct option long_options[];
+ 
+-struct {
++typedef struct {
+     enum { CMD_NONE, CMD_SEAL, CMD_UNSEAL } cmd;
+     char *data;
+     uint32_t persistent;
+@@ -139,12 +139,16 @@ struct {
+     int pcrs;
+     char *tcti;
+     int verbose;
+-} opt;
++} TPM2_INITRAMFS_TOOL_OPT;
+ 
+-struct {
++extern TPM2_INITRAMFS_TOOL_OPT opt;
++
++typedef struct {
+     void *dlhandle;
+     TSS2_TCTI_CONTEXT *context;
+-} tcti;
++} TPM2_INITRAMFS_TOOL_TCTI;
++
++extern TPM2_INITRAMFS_TOOL_TCTI tcti;
+ 
+ void tcti_finalize();
+ int tcti_init(char *str, TSS2_TCTI_CONTEXT **context);
+diff --git a/src/libtpm2-initramfs-tool.c b/src/libtpm2-initramfs-tool.c
+index 7d898c1..cbf8de4 100644
+--- a/src/libtpm2-initramfs-tool.c
++++ b/src/libtpm2-initramfs-tool.c
+@@ -59,6 +59,9 @@ const struct option long_options[] = {
+     { 0, 0, 0, 0 }
+ };
+ 
++TPM2_INITRAMFS_TOOL_OPT opt;
++TPM2_INITRAMFS_TOOL_TCTI tcti;
++
+ /** Function to generate base32 encoding string.
+  *
+  * This function generates the base32 encoding for input data.
+
diff -Nru tpm2-initramfs-tool-0.2.1/debian/patches/series tpm2-initramfs-tool-0.2.1/debian/patches/series
--- tpm2-initramfs-tool-0.2.1/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ tpm2-initramfs-tool-0.2.1/debian/patches/series	2020-11-26 20:46:51.000000000 +0100
@@ -0,0 +1 @@
+git_gcc10_build.patch

Reply via email to