Hello community,

here is the log from the commit of package tboot for openSUSE:Factory checked 
in at 2012-06-01 07:24:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tboot (Old)
 and      /work/SRC/openSUSE:Factory/.tboot.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tboot", Maintainer is "meiss...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/tboot/tboot.changes      2012-05-03 
11:00:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tboot.new/tboot.changes 2012-06-01 
07:24:35.000000000 +0200
@@ -1,0 +2,5 @@
+Thu May 31 13:20:57 CEST 2012 - meiss...@suse.de
+
+- adjust to changed zlib api
+
+-------------------------------------------------------------------

New:
----
  zlib.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tboot.spec ++++++
--- /var/tmp/diff_new_pack.uMg8ZO/_old  2012-06-01 07:24:36.000000000 +0200
+++ /var/tmp/diff_new_pack.uMg8ZO/_new  2012-06-01 07:24:36.000000000 +0200
@@ -25,7 +25,7 @@
 Group:          Productivity/Security
 Url:            http://sourceforge.net/projects/tboot/
 Source0:        %{name}-%{ver}.tar.gz
-#Patch0:         tboot-%{version}-Makefile_typo.diff
+Patch0:         zlib.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  openssl-devel
 BuildRequires:  trousers-devel
@@ -39,6 +39,7 @@
 
 %prep
 %setup -q -n %name-%ver
+%patch0 -p1
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS"

++++++ zlib.patch ++++++
Index: tboot-1.7.0/lcptools/mlehash.c
===================================================================
--- tboot-1.7.0.orig/lcptools/mlehash.c
+++ tboot-1.7.0/lcptools/mlehash.c
@@ -233,8 +233,8 @@ static void print_dump(uint32_t s, uint3
  */
 static bool read_file(const char *filename, void **buffer, size_t *length)
 {
-    FILE *fcompressed = NULL;
-    FILE *fdecompressed = NULL;
+    gzFile fcompressed = NULL;
+    FILE   *fdecompressed = NULL;
     struct stat filestat;
     char tmpbuffer[1024];
     unsigned long i;
Index: tboot-1.7.0/tb_polgen/commands.c
===================================================================
--- tboot-1.7.0.orig/tb_polgen/commands.c
+++ tboot-1.7.0/tb_polgen/commands.c
@@ -54,26 +54,31 @@ extern tb_policy_t *g_policy;
 static bool hash_file(const char *filename, bool unzip, tb_hash_t *hash)
 {
     FILE *f;
+    gzFile gf;
     static char buf[1024];
     EVP_MD_CTX ctx;
     const EVP_MD *md;
     int read_cnt;
 
-    if ( unzip )
-        f = gzopen(filename, "rb");
-    else
+    if ( unzip ) {
+        gf = gzopen(filename, "rb");
+        if ( gf == NULL ) {
+            error_msg("File %s does not exist\n", filename);
+            return false;
+        }
+    } else {
         f = fopen(filename, "rb");
-
-    if ( f == NULL ) {
-        error_msg("File %s does not exist\n", filename);
-        return false;
+        if ( f == NULL ) {
+            error_msg("File %s does not exist\n", filename);
+            return false;
+        }
     }
 
     md = EVP_sha1();
     EVP_DigestInit(&ctx, md);
     do {
         if ( unzip )
-            read_cnt = gzread(f, buf, sizeof(buf));
+            read_cnt = gzread(gf, buf, sizeof(buf));
         else
             read_cnt = fread(buf, 1, sizeof(buf), f);
         if ( read_cnt == 0 )
@@ -84,7 +89,7 @@ static bool hash_file(const char *filena
     EVP_DigestFinal(&ctx, hash->sha1, NULL);
 
     if ( unzip )
-        gzclose(f);
+        gzclose(gf);
     else
         fclose(f);
 
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to