18385582 compress/gzip package bringing in extra dependancies with fix for 15440739 s11u2-sru
authorJan Noha <jan.noha@oracle.com>
Thu, 24 Apr 2014 17:36:25 +0200
branchs11u2-sru
changeset 3388 68cefdb716e2
parent 3385 cb76431f36d7
child 3389 b77a52ff5cfd
18385582 compress/gzip package bringing in extra dependancies with fix for 15440739
components/gzip/gzip.p5m
components/gzip/patches/znew.patch
components/gzip/resolve.deps
--- a/components/gzip/gzip.p5m	Sat Oct 11 09:09:04 2014 -0700
+++ b/components/gzip/gzip.p5m	Thu Apr 24 17:36:25 2014 +0200
@@ -65,7 +65,7 @@
     name="The GNU Zip (gzip) compression utility"
 license gzip.license license="GPLv3, FDLv1.3"
 
-# znew needs GNU chmod.
-depend type=require fmri=__TBD pkg.debug.depend.file=usr/gnu/bin/chmod
+# znew requires python, see patches/znew.patch for details
+depend type=require fmri=__TBD pkg.debug.depend.file=usr/bin/python
 # zgrep needs a version of grep that has the -f command line option.
 depend type=require fmri=__TBD pkg.debug.depend.file=usr/xpg4/bin/grep
--- a/components/gzip/patches/znew.patch	Sat Oct 11 09:09:04 2014 -0700
+++ b/components/gzip/patches/znew.patch	Thu Apr 24 17:36:25 2014 +0200
@@ -7,7 +7,7 @@
 * znew.in: Rewrite to avoid the need for a temporary file in /tmp.
 That way, we avoid the need for set -C
 and worrying about denial of service.
-Use touch -r and chmod --reference rather than cpmod.
+Use touch -r and python rather than cpmod.
 Assume cp -p works, as it's now universal.
 Quote 'echo' args better, while we're at it.
 (warn, tmp, cpmod, cpmodarg): Remove.
@@ -42,10 +42,8 @@
 +does not support the
 +.B \-\-reference
 +option.
-diff --git a/znew.in b/znew.in
-index 9bd3ce9..d16311a 100644
---- a/znew.in
-+++ b/znew.in
+--- gzip-1.5/znew.in	2014-04-24 14:54:00.798820086 +0200
++++ gzip-1.5/znew.in	2014-04-24 14:53:49.388094138 +0200
 @@ -21,7 +21,7 @@
  case $1 in
  --__bindir) bindir=${2?}; shift; shift;;
@@ -92,7 +90,7 @@
  
  for arg
  do
[email protected]@ -116,26 +92,27 @@ if test -n "$opt"; then
[email protected]@ -116,26 +92,32 @@ if test -n "$opt"; then
  fi
  
  for i do
@@ -109,7 +107,12 @@
        # Copy file attributes from old file to new one, if possible.
 -      test -n "$cpmod" && $cpmod $cpmodarg "$n.Z" "$n$ext" 2> /dev/null
 +      touch -r"$n.Z" -- "$n$ext" 2>/dev/null
-+      chmod --reference="$n.Z" -- "$n$ext" 2>/dev/null
++      python -c '
++	      import os
++	      import sys
++	      mode = os.stat(sys.argv[1]).st_mode & 07777
++	      os.chmod(sys.argv[2], mode)
++      ' "$n.Z" "$n$ext"
      else
 -      echo error while recompressing $n.Z
 +      echo "error while recompressing $n.Z"
@@ -126,7 +129,7 @@
          res=1; continue
        fi
      fi
[email protected]@ -143,7 +120,7 @@ for i do
[email protected]@ -143,7 +125,7 @@ for i do
        :
      else
        test $check -eq 1 && mv "$n.$$" "$n.Z"
@@ -135,7 +138,7 @@
        res=1; continue
      fi
      if gzip $opt "$n"; then
[email protected]@ -151,10 +128,10 @@ for i do
[email protected]@ -151,10 +133,10 @@ for i do
      else
        if test $check -eq 1; then
          mv "$n.$$" "$n.Z" && rm -f "$n"
@@ -148,7 +151,7 @@
        fi
        res=1; continue
      fi
[email protected]@ -175,7 +152,7 @@ for i do
[email protected]@ -175,7 +157,7 @@ for i do
      else
        test $pipe -eq 0 && mv "$n.$$" "$n.Z"
        rm -f "$n$ext"
@@ -157,5 +160,3 @@
        res=1; continue
      fi
    elif test $pipe -eq 1; then
--- 
-1.8.3.1
--- a/components/gzip/resolve.deps	Sat Oct 11 09:09:04 2014 -0700
+++ b/components/gzip/resolve.deps	Thu Apr 24 17:36:25 2014 +0200
@@ -1,4 +1,5 @@
-file/gnu-coreutils
 shell/bash
 system/library
 system/xopen/xcu4
+runtime/python-26
+runtime/python-27