From 686fe0d87e942fda01ff16eb25766153286d3997 Mon Sep 17 00:00:00 2001 From: Gabor Kovesdan Date: Thu, 1 Feb 2007 22:18:55 +0000 Subject: [PATCH] - Update to 1.3.9 - Change MASTER_SITES to MASTER_SITE_GNU - Add proper CONFIGURE_ARGS - Remove old patches - Possibly fix security issues (it will need more investigation, this version is still marked as vulnerable in VuXML, I'll check later) PR: ports/108458 Submitted by: Jason Harris Approved by: erwin (mentor) --- archivers/gzip/Makefile | 12 +++--- archivers/gzip/distinfo | 6 +-- archivers/gzip/files/patch-gzip.c | 62 ----------------------------- archivers/gzip/files/patch-zgrep.in | 29 -------------- 4 files changed, 8 insertions(+), 101 deletions(-) delete mode 100644 archivers/gzip/files/patch-gzip.c delete mode 100644 archivers/gzip/files/patch-zgrep.in diff --git a/archivers/gzip/Makefile b/archivers/gzip/Makefile index 131b88d434f0..8aea2d4c02f4 100644 --- a/archivers/gzip/Makefile +++ b/archivers/gzip/Makefile @@ -6,20 +6,18 @@ # PORTNAME= gzip -PORTVERSION= 1.3.5 -PORTREVISION= 2 +PORTVERSION= 1.3.9 CATEGORIES= archivers -MASTER_SITES= ftp://sunfreeware.risq.qc.ca/SOURCES/ \ - ftp://sunsite.cnlab-switch.ch/mirror/solaris-freeware/SOURCES/ \ - ftp://ftp.ibiblio.org/pub/packages/solaris/freeware/SOURCES/ \ - ftp://sunsite.belnet.be/mirror/ftp.sunfreeware.com/pub/freeware/SOURCES/ -EXTRACT_SUFX= .tar.Z +MASTER_SITES= ${MASTER_SITE_GNU} +MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= gabor@FreeBSD.org COMMENT= A compression utility designed to be a replacement for compress GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ARGS+= --infodir=${LOCALBASE}/info \ + --mandir=${MANPREFIX}/man MAN1= gunzip.1 gzexe.1 gzip.1 zcat.1 zcmp.1 zdiff.1 zforce.1 \ zgrep.1 zless.1 zmore.1 znew.1 diff --git a/archivers/gzip/distinfo b/archivers/gzip/distinfo index a55d75821a17..3b1124ea1140 100644 --- a/archivers/gzip/distinfo +++ b/archivers/gzip/distinfo @@ -1,3 +1,3 @@ -MD5 (gzip-1.3.5.tar.Z) = 2215e466021d2dabca8a4ddd17d322bc -SHA256 (gzip-1.3.5.tar.Z) = 8739c5b461f5bd591ecfcf1e0c205be8d98d20d1f22dca88b501fd2fff732834 -SIZE (gzip-1.3.5.tar.Z) = 493079 +MD5 (gzip-1.3.9.tar.gz) = 7cf923b24b718c418e85a283b2260e14 +SHA256 (gzip-1.3.9.tar.gz) = a6fdbe5ce21f5e4ce219375c29e842da517e61a56900a678cf258b4fdd603e72 +SIZE (gzip-1.3.9.tar.gz) = 420737 diff --git a/archivers/gzip/files/patch-gzip.c b/archivers/gzip/files/patch-gzip.c deleted file mode 100644 index afa8e0d157d3..000000000000 --- a/archivers/gzip/files/patch-gzip.c +++ /dev/null @@ -1,62 +0,0 @@ ---- gzip.c.orig Sat Sep 28 09:38:43 2002 -+++ gzip.c Sat Jun 18 16:12:37 2005 -@@ -875,8 +875,11 @@ - } - - close(ifd); -- if (!to_stdout && close(ofd)) { -- write_error(); -+ if (!to_stdout) { -+ /* Copy modes, times, ownership, and remove the input file */ -+ copy_stat(&istat); -+ if (close(ofd)) -+ write_error(); - } - if (method == -1) { - if (!to_stdout) xunlink (ofname); -@@ -896,10 +899,6 @@ - } - fprintf(stderr, "\n"); - } -- /* Copy modes, times, ownership, and remove the input file */ -- if (!to_stdout) { -- copy_stat(&istat); -- } - } - - /* ======================================================================== -@@ -1317,6 +1316,7 @@ - /* Copy the base name. Keep a directory prefix intact. */ - char *p = base_name (ofname); - char *base = p; -+ char *base2; - for (;;) { - *p = (char)get_char(); - if (*p++ == '\0') break; -@@ -1324,6 +1324,8 @@ - error("corrupted input -- file name too large"); - } - } -+ base2 = basename (base); -+ strcpy(base, base2); - /* If necessary, adapt the name to local OS conventions: */ - if (!list) { - MAKE_LEGAL_NAME(base); -@@ -1725,7 +1727,7 @@ - reset_times(ofname, ifstat); - #endif - /* Copy the protection modes */ -- if (chmod(ofname, ifstat->st_mode & 07777)) { -+ if (fchmod(ofd, ifstat->st_mode & 07777)) { - int e = errno; - WARN((stderr, "%s: ", progname)); - if (!quiet) { -@@ -1734,7 +1736,7 @@ - } - } - #ifndef NO_CHOWN -- chown(ofname, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */ -+ (void) fchown(ofd, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */ - #endif - remove_ofname = 0; - /* It's now safe to remove the input file: */ diff --git a/archivers/gzip/files/patch-zgrep.in b/archivers/gzip/files/patch-zgrep.in deleted file mode 100644 index 3d1039b6ebd4..000000000000 --- a/archivers/gzip/files/patch-zgrep.in +++ /dev/null @@ -1,29 +0,0 @@ ---- zgrep.in -+++ zgrep.in -@@ -24,7 +24,7 @@ - - PATH="BINDIR:$PATH"; export PATH - --prog=`echo $0 | sed 's|.*/||'` -+prog=`echo "$0" | sed 's|.*/||'` - case "$prog" in - *egrep) grep=${EGREP-egrep -a} ;; - *fgrep) grep=${FGREP-fgrep -a} ;; -@@ -112,12 +112,15 @@ - fi - $uncompress -cdfq "$i" | - if test $files_with_matches -eq 1; then -- $grep $opt "$pat" > /dev/null && echo $i -+ $grep $opt "$pat" > /dev/null && printf "%s\n" "$i" - elif test $files_without_matches -eq 1; then -- $grep $opt "$pat" > /dev/null || echo $i -+ $grep $opt "$pat" > /dev/null || printf "%s\n" "$i" - elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then - $grep $opt "$pat" - else -+ i=${i//\\/\\\\} -+ i=${i//|/\\|} -+ i=${i//&/\\&} - if test $with_filename -eq 1; then - sed_script="s|^[^:]*:|${i}:|" - else