~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rubygems/package/tar_input.rb

  • Committer: Package Import Robot
  • Author(s): Antonio Terceiro, Lucas Nussbaum, Daigo Moriwaki, James Healy, Antonio Terceiro
  • Date: 2012-06-02 07:42:28 UTC
  • mfrom: (21.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120602074228-09t2jgg1ozrsnnfo
Tags: 1.9.3.194-1
[ Lucas Nussbaum ]
* Add hurd-path-max.diff. Fixes FTBFS on Hurd. (Closes: #648055)

[ Daigo Moriwaki ]
* Removed debian/patches/debian/patches/sparc-continuations.diff,
  which the upstream has applied.
* debian/rules:
  - Bumped up tcltk_ver to 8.5.
  - Used chrpath for tcltklib.so to fix a lintian error,
    binary-or-shlib-defines-rpath.
* debian/control:
  - Suggests ruby-switch. (Closes: #654312)
  - Build-Depends: chrpath.
* debian/libruby1.9.1.symbols: Added a new symbol for
  rb_str_modify_expand@Base.
* debian/run-test-suites.bash:
  - Corrected options for test-all.
  - Enabled timeout to allow hang tests to be aborted.

[ James Healy ]
* New upstream release: 1.9.3p194 (Closes: #669582)
  + This release includes a fix for CVE-2011-0188 (Closes: #628451)
  + This release also does not segfault when running the test suite under
    amd64 (Closes: #674347)
* Enable hardened build flags (Closes: #667964)
* debian/control:
  - depend on specific version on coreutils
  - update policy version (no changes)

[ Antonio Terceiro ]
* debian/ruby1.9.1.postinst:
  + bump alternatives priority for `ruby` to 51 so that Ruby 1.9 has a
    higher priority than Ruby 1.8 (50).
  + bump alternatives priority for `gem` to 181 so that the Rubygems
    provided by Ruby 1.9 has priority over the one provided by the rubygems
    package.
* debian/control: added myself to Uploaders:
* debian/libruby1.9.1.symbols: update with new symbols added in 1.9.3p194
  upstream release.
* debian/manpages/*: fix references to command names with s/1.9/1.9.1/
* debian/rules: skip running DRB tests, since they seem to make the build
  hang. This should close #647296, but let's way and see. Also, with this do
  not need to timeout the test suite anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
  # the unpacking speed) we threw our hands in the air and declared that
211
211
  # this method would use the String IO approach on all platforms at all
212
212
  # times.  And that's the way it is.
213
 
 
 
213
  #
 
214
  # Revisited.  Here's the beginning of the long story.
 
215
  # http://osdir.com/ml/lang.ruby.gems.devel/2007-06/msg00045.html
 
216
  #
 
217
  # StringIO wraping has never worked as a workaround by definition.  Skipping
 
218
  # initial 10 bytes and passing -MAX_WBITS to Zlib::Inflate luckily works as
 
219
  # gzip reader, but it only works if the GZip header is 10 bytes long (see
 
220
  # below) and it does not check inflated stream consistency (CRC value in the
 
221
  # Gzip trailer.)
 
222
  #
 
223
  #   RubyGems generated Gzip Header: 10 bytes
 
224
  #     magic(2) + method(1) + flag(1) + mtime(4) + exflag(1) + os(1) +
 
225
  #     orig_name(0) + comment(0)
 
226
  #
 
227
  # Ideally, it must return a GZipReader without meaningless buffering.  We
 
228
  # have lots of CRuby committers around so let's fix windows build when we
 
229
  # received an error.
214
230
  def zipped_stream(entry)
215
 
    if defined? Rubinius or defined? Maglev then
216
 
      # these implementations have working Zlib
217
 
      zis = Zlib::GzipReader.new entry
218
 
      dis = zis.read
219
 
      is = StringIO.new(dis)
220
 
    else
221
 
      # This is Jamis Buck's Zlib workaround for some unknown issue
222
 
      entry.read(10) # skip the gzip header
223
 
      zis = Zlib::Inflate.new(-Zlib::MAX_WBITS)
224
 
      is = StringIO.new(zis.inflate(entry.read))
225
 
    end
226
 
  ensure
227
 
    zis.finish if zis
 
231
    Zlib::GzipReader.new entry
228
232
  end
229
233
 
230
234
end