Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian....@packages.debian.org
Usertags: pu

Hi,

I'd like to update fuse-zip in stretch to fix a bug which prevents it from
writing changes back to zip files. I took upstream's patch and applied it to the
version in stretch: https://bitbucket.org/agalanin/fuse-zip/commits/9b9c2f47cfe9

Changes:
 fuse-zip (0.4.0-2+deb9u1) stretch; urgency=medium
 .
   * Backport upstream commit 9b9c2f47cfe9 to fix writeback fail with libzip 1.0

Best regards,
Matthew
diff -Nru fuse-zip-0.4.0/debian/changelog fuse-zip-0.4.0/debian/changelog
--- fuse-zip-0.4.0/debian/changelog	2015-02-24 01:15:35.000000000 +1100
+++ fuse-zip-0.4.0/debian/changelog	2018-02-03 10:44:41.000000000 +1100
@@ -1,3 +1,9 @@
+fuse-zip (0.4.0-2+deb9u1) stretch; urgency=medium
+
+  * Backport upstream commit 9b9c2f47cfe9 to fix writeback fail with libzip 1.0
+
+ -- Matthew Harm Bekkema <mbekkem...@gmail.com>  Sat, 03 Feb 2018 10:44:41 +1100
+
 fuse-zip (0.4.0-2) unstable; urgency=low
 
   * Bump standards
diff -Nru fuse-zip-0.4.0/debian/control fuse-zip-0.4.0/debian/control
--- fuse-zip-0.4.0/debian/control	2015-02-24 01:14:52.000000000 +1100
+++ fuse-zip-0.4.0/debian/control	2018-02-03 10:44:41.000000000 +1100
@@ -1,7 +1,7 @@
 Source: fuse-zip
 Section: utils
 Priority: optional
-Maintainer: Matthew Bekkema <mbekkem...@gmail.com>
+Maintainer: Matthew Harm Bekkema <mbekkem...@gmail.com>
 Build-Depends: debhelper (>= 9),
  libfuse-dev,
  libzip-dev (>= 0.11.2),
diff -Nru fuse-zip-0.4.0/debian/patches/fix-zip-source-supports.patch fuse-zip-0.4.0/debian/patches/fix-zip-source-supports.patch
--- fuse-zip-0.4.0/debian/patches/fix-zip-source-supports.patch	1970-01-01 10:00:00.000000000 +1000
+++ fuse-zip-0.4.0/debian/patches/fix-zip-source-supports.patch	2018-02-03 10:44:41.000000000 +1100
@@ -0,0 +1,59 @@
+Author: Alexander Galanin <a...@galanin.nnov.ru>
+Description: Properly handle ZIP_SOURCE_SUPPORTS call introduced in libzip 1.0
+
+--- a/lib/bigBuffer.cpp
++++ b/lib/bigBuffer.cpp
+@@ -1,5 +1,5 @@
+ ////////////////////////////////////////////////////////////////////////////
+-//  Copyright (C) 2008-2014 by Alexander Galanin                          //
++//  Copyright (C) 2008-2016 by Alexander Galanin                          //
+ //  a...@galanin.nnov.ru                                                    //
+ //  http://galanin.nnov.ru/~al                                            //
+ //                                                                        //
+@@ -282,9 +282,27 @@
+             delete b;
+             return 0;
+         }
+-        default: {
++        case ZIP_SOURCE_CLOSE:
+             return 0;
++        case ZIP_SOURCE_ERROR: {
++            // This code should not be called in normal case because none of
++            // implemented functions raises error flag.
++            int *errs = static_cast<int *>(data);
++#if LIBZIP_VERSION_MAJOR >= 1
++            errs[0] = ZIP_ER_OPNOTSUPP;
++#else
++            errs[0] = ZIP_ER_INVAL;
++#endif
++            errs[1] = EINVAL;
++            return 2 * sizeof(int);
+         }
++#if LIBZIP_VERSION_MAJOR >= 1
++        case ZIP_SOURCE_SUPPORTS:
++            return ZIP_SOURCE_SUPPORTS_READABLE;
++#endif
++        default:
++            // indicate unsupported operation
++            return -1;
+     }
+ }
+ 
+--- a/lib/bigBuffer.h
++++ b/lib/bigBuffer.h
+@@ -1,5 +1,5 @@
+ ////////////////////////////////////////////////////////////////////////////
+-//  Copyright (C) 2008-2014 by Alexander Galanin                          //
++//  Copyright (C) 2008-2016 by Alexander Galanin                          //
+ //  a...@galanin.nnov.ru                                                    //
+ //  http://galanin.nnov.ru/~al                                            //
+ //                                                                        //
+@@ -48,8 +48,6 @@
+ 
+     /**
+      * Callback for zip_source_function.
+-     * ZIP_SOURCE_CLOSE is not needed to be handled, ZIP_SOURCE_ERROR is
+-     * never called because read() always successfull.
+      * See zip_source_function(3) for details.
+      */
+     static zip_int64_t zipUserFunctionCallback(void *state, void *data,
diff -Nru fuse-zip-0.4.0/debian/patches/series fuse-zip-0.4.0/debian/patches/series
--- fuse-zip-0.4.0/debian/patches/series	1970-01-01 10:00:00.000000000 +1000
+++ fuse-zip-0.4.0/debian/patches/series	2018-02-03 10:44:41.000000000 +1100
@@ -0,0 +1 @@
+fix-zip-source-supports.patch

Reply via email to