You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/05/02 23:29:48 UTC

DO NOT REPLY [Bug 42322] New: - Tar task loses executable bit

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322

           Summary: Tar task loses executable bit
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: dmaziuk@bmrb.wisc.edu


<chmod file="${dist}/tmp/script.sh" perm="a+rx"/>
<tar destfile="${dist}/${tarball_name}.${DSTAMP}.tar">
   <tarfileset dir="${dist}/tmp">
     <include name="**/*"/>
   </tarfileset>
</tar>

After untarring, script.sh is 0644

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From alexeys@inventigo.com  2007-05-02 18:28 -------
User's permissions is enough to extrapolate permissions for groups and others.
File extensions could be used in pre Java 6 VMs.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From alexeys@inventigo.com  2007-05-02 18:05 -------
There is in Java 6 and ofter permission could be guessed by extension.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From stevel@apache.org  2007-05-03 08:04 -------
>If you can't stick to unix Tape ARchive specs (which include preserving special
>files like symlinks and permissions), you should not call it "tar". Call the
>task "NotQuiteTar" or "Jar" or whatever.

We do create legal tar files. It is only that you do not get the information
picked up from the filesystem...you need to set permissions inside the
<tarfileset> elements. The tar file spec has nothing to say on how the file is
created, only what it looks like inside.



>you can trivially get a correct tarball by exec'ing tar so why not just
have tar task do that if tar executable is available.

Because you will end up writing a build file that doesnt work on Windows. It is
inconvenient to have to use <tarfileset> to mark things as executable, but once
you've done it, you can create and release your project in a tar file, on
windows, netware, anything else.

Leaving this as wontfix. What may be more interesting is to have untar and copy
to preserve permissions, as that should not stop a windows build from working.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322


carej@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From carej@us.ibm.com  2007-05-02 18:02 -------
This is the standard behavior: there is no pure Java way to retain permissions.
Please see the developer list archives for the many discussions on this topic.

As a workaround use the dirmode & filemode attributes of tarfileset.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From alexeys@inventigo.com  2007-05-02 18:41 -------
Personally I do run GNU tar on Unix platforms instead of of <tar>. A simple
<macrodef> does the trick.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From dmaziuk@bmrb.wisc.edu  2007-05-02 18:39 -------
(In reply to comment #5)
> OTGH, you can trivially get a correct tarball by exec'ing tar so why not just
> have tar task do that if tar executable is available.

Oh, wait, that'd be just like that bad scary "make" that we wanted to get away
from in the first place.
(Sorry, couldn't resist.)


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From dmaziuk@bmrb.wisc.edu  2007-05-02 18:35 -------
(In reply to comment #3)
> And again, unless I've greatly misunderstood the APIs in Java 6, you still 
> can't query ALL of the permission data, only the data that applies to the
> owner of the VM process.

If you can't stick to unix Tape ARchive specs (which include preserving special
files like symlinks and permissions), you should not call it "tar". Call the
task "NotQuiteTar" or "Jar" or whatever.

OTGH, you can trivially get a correct tarball by exec'ing tar so why not just
have tar task do that if tar executable is available.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 42322] - Tar task loses executable bit

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42322





------- Additional Comments From carej@us.ibm.com  2007-05-02 18:21 -------
And again, unless I've greatly misunderstood the APIs in Java 6, you still can't
query ALL of the permission data, only the data that applies to the owner of the
VM process.

As for inferring permissions by extension, doesn't tarfileset allow you to do
just that?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org