# HG changeset patch # User Vladimir Marek # Date 1382613981 -7200 # Node ID 2168e180aa838dbedd22b7a17396d97bfa54b018 # Parent b85607555ab0d99070bf87ea656fde7f1e551239 15803356 SUNBT7183526-12.0 Update gzip to version 1.5 diff -r b85607555ab0 -r 2168e180aa83 components/gzip/Makefile --- a/components/gzip/Makefile Wed Nov 27 07:21:05 2013 -0800 +++ b/components/gzip/Makefile Thu Oct 24 13:26:21 2013 +0200 @@ -18,18 +18,19 @@ # # CDDL HEADER END # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # include ../../make-rules/shared-macros.mk COMPONENT_NAME= gzip -COMPONENT_VERSION= 1.4 +COMPONENT_VERSION= 1.5 COMPONENT_PROJECT_URL= http://www.gnu.org/software/gzip/ COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz COMPONENT_ARCHIVE_HASH= \ - sha256:d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee + sha256:b5d56e8ffc9918e8c941fab56e04121194f9870adeeb859e09c09eac264035a3 COMPONENT_ARCHIVE_URL= ftp://ftp.gnu.org/gnu/gzip/$(COMPONENT_ARCHIVE) +COMPONENT_BUGDB= utility/gzip include ../../make-rules/prep.mk include ../../make-rules/configure.mk @@ -41,7 +42,18 @@ CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" -COMPONENT_TEST_ENV += PATH=/usr/gnu/bin:/usr/bin +# Needed for "gmake test" to work successfully. +# If SHELLOPTS is exported (as it is by the userland makefiles), +# then all shell options get exported to child invocations of bash, +# which results in test failures due to nounset and xtrace being +# set unexpectedly, and errors such as "$1: unbound variable" and +# diffs failing due to script tracing in output files. +unexport SHELLOPTS + +COMPONENT_PREP_ACTION = (cd $(SOURCE_DIR); $(AUTORECONF) -if) + +# Get the binaries to test from the component build area. +COMPONENT_TEST_ENV += PATH=$(BUILD_DIR_$(BITS)):/usr/xpg4/bin:/usr/bin COMPONENT_TEST_TARGETS = check # Fix references to Solaris renamed programs (z*->gz*) in man pages, info diff -r b85607555ab0 -r 2168e180aa83 components/gzip/gzip.license --- a/components/gzip/gzip.license Wed Nov 27 07:21:05 2013 -0800 +++ b/components/gzip/gzip.license Thu Oct 24 13:26:21 2013 +0200 @@ -1,17 +1,3 @@ ------------- -- gzip 1.4 - ------------- - -Oracle Internal Tracking Number 7913 - -========================================================================= -For the avoidance of doubt, except that if any license choice other than -GPL or LGPL is available it will apply instead, Oracle elects to use -only the General Public License version 3 (GPLv3) at this time for any -software where a choice of GPL license versions is made available with -the language indicating that GPLv3 or any later version may be used. ------------------------------------------------------------------- - GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 diff -r b85607555ab0 -r 2168e180aa83 components/gzip/gzip.p5m --- a/components/gzip/gzip.p5m Wed Nov 27 07:21:05 2013 -0800 +++ b/components/gzip/gzip.p5m Thu Oct 24 13:26:21 2013 +0200 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # default mangler.man.stability committed> @@ -26,19 +26,15 @@ value=pkg:/compress/gzip@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) set name=pkg.description value="The GNU Zip (gzip) compression utility" set name=pkg.summary value="GNU Zip (gzip)" +set name=com.oracle.info.description value="GNU zip" +set name=com.oracle.info.tpno value=7913 set name=info.classification \ value="org.opensolaris.category.2008:Applications/System Utilities" set name=info.source-url value=$(COMPONENT_ARCHIVE_URL) set name=info.upstream-url value=$(COMPONENT_PROJECT_URL) set name=org.opensolaris.arc-caseid \ - value=PSARC/2000/488 + value=PSARC/1999/555 set name=org.opensolaris.consolidation value=$(CONSOLIDATION) -dir path=usr -dir path=usr/bin -dir path=usr/share -dir path=usr/share/info -dir path=usr/share/man -dir path=usr/share/man/man1 file path=usr/bin/gunzip file path=usr/bin/gzcat file path=usr/bin/gzcmp @@ -71,3 +67,5 @@ name="The GNU Zip (gzip) compression utility" license gzip.license license="GPLv3, FDLv1.3" +# zgrep needs a version of grep that has the -f command line option. +depend fmri=system/xopen/xcu4 type=require diff -r b85607555ab0 -r 2168e180aa83 components/gzip/patches/gzip.c.patch --- a/components/gzip/patches/gzip.c.patch Wed Nov 27 07:21:05 2013 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ ---- gzip-1.4/gzip.c.orig 2012-04-16 11:27:08.478456051 -0700 -+++ gzip-1.4/gzip.c 2012-04-23 13:06:53.395234301 -0700 -@@ -1699,36 +1699,25 @@ - int fd; - char *dir; - { -+ struct dirent **namelist; - struct dirent *dp; -- DIR *dirp; - char nbuf[MAX_PATH_LEN]; -- int len; -+ int len, n; - -- dirp = fdopendir (fd); -- -- if (dirp == NULL) { -+ /* Adjusted to use scandir to prevent compressing files multiple times -+ * on file systems that use a hash lookup for directory entries (such -+ * as btrfs and ZFS. -+ */ -+ if ((n = scandir(dir, &namelist, 0, NULL)) < 0) { - progerror(dir); - close (fd); - return ; - } -- /* -- ** WARNING: the following algorithm could occasionally cause -- ** compress to produce error warnings of the form ".gz -- ** already has .gz suffix - ignored". This occurs when the -- ** .gz output file is inserted into the directory below -- ** readdir's current pointer. -- ** These warnings are harmless but annoying, so they are suppressed -- ** with option -r (except when -v is on). An alternative -- ** to allowing this would be to store the entire directory -- ** list in memory, then compress the entries in the stored -- ** list. Given the depth-first recursive algorithm used here, -- ** this could use up a tremendous amount of memory. I don't -- ** think it's worth it. -- Dave Mack -- ** (An other alternative might be two passes to avoid depth-first.) -- */ -- -- while ((errno = 0, dp = readdir(dirp)) != NULL) { - -+ while (n--) { -+ if (errno != 0) -+ break; -+ dp = namelist[n]; - if (strequ(dp->d_name,".") || strequ(dp->d_name,"..")) { - continue; - } -@@ -1747,6 +1736,7 @@ - } - strcpy(nbuf+len, dp->d_name); - treat_file(nbuf); -+ free(dp); - } else { - fprintf(stderr,"%s: %s/%s: pathname too long\n", - program_name, dir, dp->d_name); -@@ -1755,8 +1745,8 @@ - } - if (errno != 0) - progerror(dir); -- if (CLOSEDIR(dirp) != 0) -- progerror(dir); -+ -+ free(namelist); - } - #endif /* ! NO_DIR */ - diff -r b85607555ab0 -r 2168e180aa83 components/gzip/patches/zgrep.in.patch --- a/components/gzip/patches/zgrep.in.patch Wed Nov 27 07:21:05 2013 -0800 +++ b/components/gzip/patches/zgrep.in.patch Thu Oct 24 13:26:21 2013 +0200 @@ -1,17 +1,51 @@ -This simplified patch was generated based on following community fix -which we have adopted in 12.0 and 11.2 (where we have latest gzip -version and patch applied there without problem): +From 60b3f4eb672a85de28ecaad47ed426f8c8fe6c32 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 21 Oct 2012 06:15:26 +0000 +Subject: zgrep: do not assume standard 'grep' has -e -http://git.savannah.gnu.org/cgit/gzip.git/commit/?id=60b3f4eb672a85de28ecaad47ed426f8c8fe6c32 - ---- gzip-1.4/zgrep.in Sun Jan 3 09:26:02 2010 -+++ gzip-1.4/zgrep.in Wed Nov 28 05:44:33 2012 -@@ -26,7 +26,7 @@ +On Solaris 11, /usr/bin/grep -e does not work. +Problem reported by Petr Sumbera in +. +* Makefile.am (.in): Substitute @GREP@. +* configure.ac (AC_PROG_GREP): Invoke. +* zgrep.in (grep): Use @GREP@. +--- +diff --git a/Makefile.am b/Makefile.am +index 86a0297..90fff2d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -84,6 +84,7 @@ SUFFIXES = .in + $(AM_V_GEN)sed \ + -e 's|/bin/sh|$(SHELL)|g' \ + -e 's|[@]bindir@|'\''$(bindir)'\''|g' \ ++ -e 's|[@]GREP@|$(GREP)|g' \ + -e 's|[@]VERSION@|$(VERSION)|g' \ + $(srcdir)/$@.in >$@-t \ + && chmod a+x $@-t \ +diff --git a/configure.ac b/configure.ac +index 4705ce4..ecb362b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,6 +33,7 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. + AC_PROG_CC_STDC + AM_PROG_CC_C_O + AC_PROG_CPP ++AC_PROG_GREP + AC_CHECK_TOOL([NM], [nm], [nm]) + AC_PROG_LN_S + AC_PROG_RANLIB +diff --git a/zgrep.in b/zgrep.in +index f878acf..aec4a67 100644 +--- a/zgrep.in ++++ b/zgrep.in +@@ -28,7 +28,7 @@ case $1 in esac PATH=$bindir:$PATH -grep='${GREP-grep}' -+grep='${GREP-'\''/usr/bin/ggrep'\''}' ++grep='${GREP-'\''@GREP@'\''}' version='zgrep (gzip) @VERSION@ - Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. +-- +cgit v0.9.0.2