You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Michael Guymon (JIRA)" <ji...@apache.org> on 2010/11/13 21:39:13 UTC

[jira] Created: (BUILDR-546) Support for Rubyzip 0.9.4

Support for Rubyzip 0.9.4
-------------------------

                 Key: BUILDR-546
                 URL: https://issues.apache.org/jira/browse/BUILDR-546
             Project: Buildr
          Issue Type: Improvement
          Components: Packaging
    Affects Versions: 1.4.3
            Reporter: Michael Guymon
             Fix For: 1.4.3


To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.

This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934949#action_12934949 ] 

Alex Boisvert commented on BUILDR-546:
--------------------------------------

I tried with both rubyzip 0.9.1 and 0.9.4.   Same result.

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060358#comment-13060358 ] 

Hudson commented on BUILDR-546:
-------------------------------

Integrated in Buildr-ci-build #235 (See [https://builds.apache.org/job/Buildr-ci-build/235/])
    

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch, rubyzip_0.9.4_support_mk2.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Michael Guymon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931728#action_12931728 ] 

Michael Guymon commented on BUILDR-546:
---------------------------------------

The override of the Zip::ZipEntry#write_c_dir_entry method is pretty crude, Ill submit a patch for rubyzip so it hopefully wont have to stay long.

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.3
>            Reporter: Michael Guymon
>             Fix For: 1.4.3
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Peter Donald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald closed BUILDR-546.
-------------------------------


> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch, rubyzip_0.9.4_support_mk2.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert resolved BUILDR-546.
----------------------------------

    Resolution: Fixed

Thanks Michael!  It works now.  Applied your patch.

boisvert@smudge:~/git/buildr$ git svn dcommit
Committing to https://svn.apache.org/repos/asf/buildr/trunk ...
	M	CHANGELOG
	M	buildr.gemspec
	M	lib/buildr/packaging.rb
	M	lib/buildr/packaging/zip.rb
	M	spec/packaging/archive_spec.rb
Committed r1038404


> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch, rubyzip_0.9.4_support_mk2.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Michael Guymon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Guymon updated BUILDR-546:
----------------------------------

    Attachment: rubyzip_0.9.4_support_mk2.patch

Updated the monkey patch to override the invalid comment, so a correct header will be set in the zip.

The jar header check used in the spec, using 'jar tvf <file>', only works on non empty zips, otherwise it returns "java.util.zip.ZipException: error in opening zip file". 

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch, rubyzip_0.9.4_support_mk2.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Michael Guymon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Guymon updated BUILDR-546:
----------------------------------

    Attachment: rubyzip_0.9.4_support.patch

patch from https://github.com/mguymon/buildr

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.3
>            Reporter: Michael Guymon
>             Fix For: 1.4.3
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934956#action_12934956 ] 

Alex Boisvert commented on BUILDR-546:
--------------------------------------

I added stricter zip validity testing in our specs to uncover the error mentioned above.

boisvert@smudge:~/git/buildr$ git commit -m "Also use Java's 'jar' command to test zip file validity" spec/

boisvert@smudge:~/git/buildr$ git svn dcommit
Committing to https://svn.apache.org/repos/asf/buildr/trunk ...
	M	spec/packaging/archive_spec.rb
Committed r1038255

Running "rspec -fn -c -b spec/packaging/archive_spec.rb -e ZipTask" with your patch now fails, as it should.

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Michael Guymon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934884#action_12934884 ] 

Michael Guymon commented on BUILDR-546:
---------------------------------------

What version RubyZip are you using?

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934736#action_12934736 ] 

Alex Boisvert commented on BUILDR-546:
--------------------------------------

I just tried the patch on my system (Ubuntu 9.10) and it appears the generated zip files are incompatible with Java's jar tool.

When I try to unzip a .jar, "jar xvf some.jar" I get:

java.util.zip.ZipException: invalid END header (bad central directory offset)
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
	at java.util.zip.ZipFile.<init>(ZipFile.java:75)
	at sun.tools.jar.Main.list(Main.java:979)
	at sun.tools.jar.Main.run(Main.java:224)
	at sun.tools.jar.Main.main(Main.java:1149)


> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.3
>            Reporter: Michael Guymon
>             Fix For: 1.4.3
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-546) Support for Rubyzip 0.9.4

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-546:
---------------------------------

        Fix Version/s:     (was: 1.4.3)
                       1.4.5
    Affects Version/s:     (was: 1.4.3)
                       1.4.4

> Support for Rubyzip 0.9.4
> -------------------------
>
>                 Key: BUILDR-546
>                 URL: https://issues.apache.org/jira/browse/BUILDR-546
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.4.4
>            Reporter: Michael Guymon
>             Fix For: 1.4.5
>
>         Attachments: rubyzip_0.9.4_support.patch
>
>
> To support rubyzip 0.9.4, an override is needed to Zip::ZipEntry#write_c_dir_entry to fix comments length error.
> This and other monkey patching to Zip::ZipEntry make other gems break (such as warbler 1.2.1) if buildr uses autoload. While the monkey patches exist, rubyzip will have to be required instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.