#15 new
James Mead

[#14134] mocha tarballs don't uncompress cleanly

Reported by James Mead | January 1st, 2009 @ 07:25 PM

Date: 2007-09-21 15:28 Opener: James Mead

I'm reporting this bug on behalf of Antonio Terceiro who has already done a lot of investigation into the problem. I'm pasting in the salient points below. I believe the latest thinking is that the problem is introduced when the xforge rake task is used to upload the package to rubyforge.

-- James Mead

I downloaded the mocha tarball for versions 0.5.0, 0.5.1 and 0.5.2 (didn't test older ones), and when uncompressing all of them I get the following error:

$ LANG=C tar xzf ../mocha-0.5.2.tgz

gzip: stdin: decompression OK, trailing garbage ignored
tar: Child returned status 2
tar: Error exit delayed from previous errors

The tarball is uncompressed, but this error message (and the non-zero exit status) is pretty annoying.

I tried to reproduce the tarball generation here on my machine, by entering the mocha-0.5.2 directory and issuing a rake package command, but the generated tarball is uncompressed cleanly. According to the message, the problem seems to be in the gzip compression, but I can't actually tell what is causing it.

Can you please tell me which environment you are used to generate the mocha packages on, so I can try to prepare a fix to this issue?

Best regards,

-- Antonio Terceiro

Aha, just as I as I suspected: the tarball on rubyforge is different from the one you have.

They are almost identical, but there is an extra newline byte pair (0a0d = "\n\r") at the end of the file ... I checked and all the other files (*.zip and .gem) and they also have a 0a0d at their ends.

-- Antonio Terceiro

It seems that the upload procedure adds the extra "\r\n" to all the files. This is probably in the *forge integration, not on GemPackageTask; but I couldn't firgure out exactly where this bug happens while looking at the code.

I think it would be worth to ask rubyforge for a test project.

-- Antonio Terceiro

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A mocking & stubbing library for Ruby.

* <a href="http://github.com/floehopper/mocha">GitHub repository</a>
* <a href="http://mocha.rubyforge.org">Documentation</a>
* <a href="http://groups.google.com/group/mocha-developer">Mailing List</a>

People watching this ticket