ports/88896: Updated the zip utility to version 2.31.
Jann Roeder
jann_roeder at arcor.de
Sat Nov 12 19:00:28 UTC 2005
>Number: 88896
>Category: ports
>Synopsis: Updated the zip utility to version 2.31.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 12 19:00:27 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Jann Roeder
>Release: FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:
>Description:
Update port: archivers/zip Updated to version 2.31. Seems to fix
a security issue. The crypt stuff is now part of the main distribution.
I removed the patch-over patch, since it seems to be included in 2.31.
This is my first port please let me know if I did something wrong. It
seems the patches were named incorrectly (patch-aa), but I left it that
way.
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# .
# ./files
# ./files/patch-aa
# ./files/patch-ab
# ./files/patch-negfseek
# ./Makefile
# ./distinfo
# ./pkg-descr
# ./pkg-plist
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo c - ./files
mkdir -p ./files > /dev/null 2>&1
echo x - ./files/patch-aa
sed 's/^X//' >./files/patch-aa << 'END-of-./files/patch-aa'
X--- unix/configure.orig Tue Apr 27 12:49:05 1999
X+++ unix/configure Tue Jun 24 17:47:35 2003
X@@ -23,7 +23,6 @@
X [ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
X [ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
X [ -f /lib/cpp ] && CPP=/lib/cpp
X-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
X [ -f /xenix ] && CPP="${CC} -E"
X [ -f /lynx.os ] && CPP="${CC} -E"
X
X@@ -38,7 +37,7 @@
X echo "int foo() { return 0;}" > conftest.c
X $CC -c conftest.c >/dev/null 2>/dev/null
X echo Check if compiler generates underlines
X- nm conftest.o | grep "(^|[^_])foo" >/dev/null 2>/dev/null
X+ nm conftest.o | egrep "(^|[^_])foo" >/dev/null 2>/dev/null
X [ $? -eq 0 ] && CPP="${CPP} -DNO_UNDERLINE"
X if eval "$CPP crc_i386.S > _crc_i386.s 2>/dev/null"; then
X if eval "$CC -c _crc_i386.s >/dev/null 2>/dev/null" && [ -f
_crc_i386.o ]
END-of-./files/patch-aa
echo x - ./files/patch-ab
sed 's/^X//' >./files/patch-ab << 'END-of-./files/patch-ab'
X--- unix/Makefile.orig Mon Nov 29 14:22:42 1999
X+++ unix/Makefile Tue Feb 15 21:41:55 2000
X@@ -17,7 +17,7 @@
X LN = ln -s
X
X # (to use the Gnu compiler, change cc to gcc in CC)
X-CC = cc
X+CC ?= cc
X BIND = $(CC)
X AS = $(CC) -c
X E =
X@@ -45,7 +45,7 @@
X # CFLAGS flags for C compile
X # LFLAGS1 flags after output file spec, before obj file list
X # LFLAGS2 flags after obj file list (libraries, etc)
X-CFLAGS = -O2 -I. -DUNIX $(LOCAL_ZIP)
X+CFLAGS += -I. -DUNIX $(LOCAL_ZIP)
X LFLAGS1 =
X LFLAGS2 = -s
END-of-./files/patch-ab
echo x - ./files/patch-negfseek
sed 's/^X//' >./files/patch-negfseek << 'END-of-./files/patch-negfseek'
X--- zipfile.c.orig Sun Nov 7 13:30:11 1999
X+++ zipfile.c Fri May 31 13:58:36 2002
X@@ -14,6 +14,10 @@
X #include "zip.h"
X #include "revision.h"
X
X+#ifdef __FreeBSD__
X+#include <sys/param.h>
X+#endif
X+
X #ifdef VMS
X # include <rms.h>
X # include <starlet.h>
X@@ -628,6 +632,18 @@
X
X #endif /* !UTIL */
X
X+#ifdef __FreeBSD__
X+#if __FreeBSD_version < 500028
X+local off_t fsize(FILE *f) {
X+ struct stat s;
X+
X+ if (f == NULL) return 0;
X+ if (fstat(fileno(f), &s) < 0) return 0;
X+ return s.st_size;
X+}
X+#endif
X+#endif
X+
X /*
X * scanzipf_reg starts searching for the End Signature at the end of
the file
X * The End Signature points to the Central Directory Signature which
points
X@@ -667,7 +683,13 @@
X t[1] = '\0';
X t[2] = '\0';
X t[3] = '\0';
X- if (fseek(f, -4096L, SEEK_END) == 0) {
X+ if (
X+#ifdef __FreeBSD__
X+#if __FreeBSD_version < 500028
X+ fsize(f) >= 4096L &&
X+#endif
X+#endif
X+ fseek(f, -4096L, SEEK_END) == 0) {
X zipbeg = (ulg) (ftell(f) + 4096L);
X while (!found && zipbeg >= 4096) {
X zipbeg -= 4096L;
X@@ -678,6 +700,11 @@
X * XXX error check ??
X */
X fread(buf, 1, 4096, f);
X+#ifdef __FreeBSD__
X+#if __FreeBSD_version < 500028
X+ if (ftell(f) >= 8192L)
X+#endif
X+#endif
X fseek(f, -8192L, SEEK_CUR);
X t = &buf[4095];
X /*
END-of-./files/patch-negfseek
echo x - ./Makefile
sed 's/^X//' >./Makefile << 'END-of-./Makefile'
X# New ports collection makefile for: zip
X# ftp://ftp.info-zip.org/pub/infozip/Info-ZIP.html
X# Date created: 22 Dec 1994
X# Whom: ache
X#
X# $FreeBSD: ports/archivers/zip/Makefile,v 1.30 2004/12/01 20:14:18
ache Exp $
X#
X
XPORTNAME= zip
XPORTVERSION= 2.31
XPORTREVISION= 0
XCATEGORIES= archivers
XMASTER_SITES= ftp://ftp.info-zip.org/pub/infozip/src/ \
X ftp://ftp.leo.org/pub/infozip/src/ \
X
ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \
X
ftp://ftp.mirrorservice.org/sites/ftp.info-zip.org/pub/infozip/src/ \
X ftp://mirror.switch.ch/mirror/infozip/src/ \
X
${MASTER_SITE_TEX_CTAN:S,%SUBDIR%,tools/zip/info-zip/src/,}
XDISTFILES= zip231${EXTRACT_SUFX}
X
XMAINTAINER= ache at FreeBSD.org
XCOMMENT= Create/update ZIP files compatible with pkzip
X
XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
XMAKEFILE= unix/Makefile
XMAKE_FLAGS= -f
XALL_TARGET= generic
XMAN1= zip.1
X
Xdo-install:
X.for file in zip zipcloak zipnote zipsplit
X ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin
X.endfor
X ${INSTALL_MAN} ${WRKSRC}/man/zip.1 ${PREFIX}/man/man1
X
X.include <bsd.port.mk>
END-of-./Makefile
echo x - ./distinfo
sed 's/^X//' >./distinfo << 'END-of-./distinfo'
XMD5 (zip231.tar.gz) = 6bfc076664416251d7624ab3538d1cb9
XSHA256 (zip231.tar.gz) =
2d21c0ed60346bcaa47ff0c3369219602dca1733b83ec503e9e8108dc119f719
XSIZE (zip231.tar.gz) = 781641
END-of-./distinfo
echo x - ./pkg-descr
sed 's/^X//' >./pkg-descr << 'END-of-./pkg-descr'
XZip is a compression and file packaging utility. It is compatible with
XPKZIP 2.04g (Phil Katz ZIP) for MSDOS systems. There is a companion to
zip
Xcalled unzip (of course) which you can also install from the
ports/package
Xsystem.
X
XWWW: http://www.info-zip.org/Zip.html
END-of-./pkg-descr
echo x - ./pkg-plist
sed 's/^X//' >./pkg-plist << 'END-of-./pkg-plist'
Xbin/zip
Xbin/zipcloak
Xbin/zipnote
Xbin/zipsplit
END-of-./pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list