Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-673

file permissions not preserved in Tar task

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Resolution: Fixed
  • Affects Version/s: 0.8
  • Fix Version/s: 1.0-milestone-9

Description

I have some sh scripts that I want to package in a tar. Example tasks
using Wrapper are below. The issue is that gradlew has a+x permissions
in the directory before the tar, but when untarred it is rw-rr-.
I think the Tar task should preserve file permissions.

task wrapper(type: Wrapper) { gradleVersion = '0.8' jarPath = 'gradleWrapper' }

task testTarDist(type: Tar, dependsOn: 'wrapper') {
dirName = 'testWrapper'
tarFileSet(dir: '.') { include('gradleWrapper/**') include('gradlew') include('gradlew.bat') prefix = dirName }
}

Adam Murdoch said:
You can use the 'filemode' attribute on tarFileSet to specify the permisions for files:
tarFileSet(dir: '.', filemode: '755') { ... }

so there is a workaround, but it seems like the default for tar should be to keep the preexisting permissions instead of defaulting to rw-rr-.

Issue Links

Superceded by

Improvement - An improvement or enhancement to an existing feature or task. GRADLE-679 Implement native archive handling

  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.

Activity

  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews

People

  • Assignee:
    Peter Niederwieser
    Reporter:
    Philip Crotwell
Vote (4)
Watch (2)

Dates

  • Created:
    02/Oct/09 7:56 AM
    Updated:
    04/Jan/13 5:09 AM
    Resolved:
    15/Feb/12 1:50 PM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.