You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Assaf Arkin (JIRA)" <ji...@apache.org> on 2008/01/19 02:44:34 UTC

[jira] Created: (BUILDR-23) Support for setting file mode when packaging

Support for setting file mode when packaging
--------------------------------------------

                 Key: BUILDR-23
                 URL: https://issues.apache.org/jira/browse/BUILDR-23
             Project: Buildr
          Issue Type: Bug
          Components: Packaging
            Reporter: Assaf Arkin


For example:

zip.include('script.sh', :mode=>755)

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


[jira] Resolved: (BUILDR-23) Support for setting file mode when packaging

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

Alex Boisvert resolved BUILDR-23.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.5

The patch has been applied to trunk already:

commit 6fa3ab724f8d323091984d01ad289bff6dc4a45c
Author: Assaf Arkin <as...@apache.org>
Date:   Thu Jul 2 17:19:27 2009 +0000

    Fixed: BUILDR-23 Support for setting file mode when packaging (Ittay Dror).
    
    git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@790686 13f79535-47bb-0310-9956-ffa450edef68


> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>             Fix For: 1.3.5
>
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-file-permissions-when-zipping.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Ittay Dror updated BUILDR-23:
-----------------------------

    Attachment: 0002-BUILDR-23-preserving-file-permissions-when-zipping.patch

this patch uses ZipOutputStream and sets the mode per entry

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-file-permissions-when-zipping.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Commented: (BUILDR-23) Support for setting file mode when packaging

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

Alex Boisvert commented on BUILDR-23:
-------------------------------------

Yes, this code exists on the trunk.   Tar is the only task that accepts an explicit :mode argument.   However, the ZipTask will attempt to preserve the same file attributes as they exist on the filesystem.

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>             Fix For: 1.3.5
>
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-file-permissions-when-zipping.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Assaf Arkin updated BUILDR-23:
------------------------------

        Fix Version/s: 1.3.1
    Affects Version/s:     (was: 1.3.1)
                       1.3

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>             Fix For: 1.3.1
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Commented: (BUILDR-23) Support for setting file mode when packaging

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

Alex Eagle commented on BUILDR-23:
----------------------------------

Does this still exist on HEAD? Right now, the only code that has a ":mode" symbol is in packaging/tar.rb
Where is the API that should allow setting the mode?

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>             Fix For: 1.3.5
>
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-file-permissions-when-zipping.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Ittay Dror updated BUILDR-23:
-----------------------------

    Attachment:     (was: 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch)

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-file-permissions-when-zipping.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Commented: (BUILDR-23) Support for setting file mode when packaging

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

Ittay Dror commented on BUILDR-23:
----------------------------------

about compression level: is it really useful to be able to set it? for me, creating a (distribution) zip where my executables can be executed after being extracted is much more important. (otherwise i have to tell users to chmod various files after unzipping)

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Commented: (BUILDR-23) Support for setting file mode when packaging

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

Assaf Arkin commented on BUILDR-23:
-----------------------------------

For some reason ZipFile.open is broken on JRuby (some versions), ZipOutputStream must be used in its place.  Also, this removes the ability to set compression level.  I'm not convinced it's necessary to break that feature in order to add this one.

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Commented: (BUILDR-23) Support for setting file mode when packaging

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

Assaf Arkin commented on BUILDR-23:
-----------------------------------

if you set mode on the zip entry (instead of calling add_file) you'll get ability to set mode, copy mode from original file and set compression level.

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Assaf Arkin updated BUILDR-23:
------------------------------

    Affects Version/s: 1.3.1

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>             Fix For: 1.3.1
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Assaf Arkin updated BUILDR-23:
------------------------------

    Issue Type: Improvement  (was: Bug)

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>            Reporter: Assaf Arkin
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Assaf Arkin updated BUILDR-23:
------------------------------

    Fix Version/s:     (was: 1.3.1)

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Updated: (BUILDR-23) Support for setting file mode when packaging

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

Ittay Dror updated BUILDR-23:
-----------------------------

    Attachment: 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch
                0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch

spec and patch. the patch does not allow explicitly to set the mode, but just preserve the same permissions as the source file. (note: i've tried explicitly setting mode in zip entries but this does not seem to work)

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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


[jira] Commented: (BUILDR-23) Support for setting file mode when packaging

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

Ittay Dror commented on BUILDR-23:
----------------------------------

working with Zip::ZipFile i couldn't see a way of setting compression level. trying to set mode on entry did not work (the mode remained 644). 

i'll try working directly with ZipOutputStream and the ZipEntry attributes.

> Support for setting file mode when packaging
> --------------------------------------------
>
>                 Key: BUILDR-23
>                 URL: https://issues.apache.org/jira/browse/BUILDR-23
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Assaf Arkin
>         Attachments: 0001-BUILDR-23-adding-spec-for-file-permissions-preserva.patch, 0002-BUILDR-23-preserving-permissions-of-source-files-in.patch
>
>
> For example:
> zip.include('script.sh', :mode=>755)

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