Index | Thread | Search

From:
Timo Myyrä <timo.myyra@bittivirhe.fi>
Subject:
fix error in zipnote of archivers/zip
To:
ports@openbsd.org
Date:
Mon, 23 Sep 2024 21:09:30 +0300

Download raw body.

Thread
Hi,

zipnote command currently fails:

$ zipnote test.zip > test.tmp
$ zipnote -w test.zip < test.tmp
zipnote error: Bad file descriptor
zipnote error: Temporary file failure (zi5N73U4)
$

Patch this by back-porting fix from zip 3.1b seems to fix it.

Timo

diff /usr/ports
commit - 8fa0c6f48793582a907ff1930b5f32099b9038bc
path + /usr/ports
blob - c42012c631f1fa4a9a5877d0a51994bf078beee2
file + archivers/zip/Makefile
--- archivers/zip/Makefile
+++ archivers/zip/Makefile
@@ -1,7 +1,7 @@
 COMMENT=	create/update ZIP files compatible with PKZip(tm)
 
 VERSION=	3.0
-REVISION=	2
+REVISION=	3
 DISTNAME=	zip${VERSION:S/.//}
 PKGNAME=	zip-${VERSION}
 
blob - /dev/null
file + archivers/zip/patches/patch-zipnote_c (mode 644)
--- /dev/null
+++ archivers/zip/patches/patch-zipnote_c
@@ -0,0 +1,12 @@
+Index: zipnote.c
+--- zipnote.c.orig
++++ zipnote.c
+@@ -661,7 +661,7 @@ char **argv;            /* command line tokens */
+     if ((r = zipcopy(z)) != ZE_OK)
+       ziperr(r, "was copying an entry");
+   }
+-  fclose(x);
++  fclose(in_file);
+ 
+   /* Write central directory and end of central directory with new comments */
+   if ((c = zftello(y)) == (zoff_t)-1)    /* get start of central */