Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ant won't preserve symlinks #31

Open
honza-kasik opened this issue Nov 30, 2018 · 5 comments
Open

Ant won't preserve symlinks #31

honza-kasik opened this issue Nov 30, 2018 · 5 comments

Comments

@honza-kasik
Copy link
Contributor

honza-kasik commented Nov 30, 2018

When unzip is not available on machine, Ant is used to unzip a file. This method however won't preserve symlinks and filesystem permissions which is crucial for httpd for example. Ant has to be either:

  • Removed and unzip has to be listed as a dependency for noe-core
  • Replaced by a method/dependency which knows how to handle symlinks
@jan-onderka
Copy link
Collaborator

Zip archive by design doesn't preserve file system permissions.

@honza-kasik honza-kasik changed the title Ant won't preserve symlinks and filesystem permissions Ant won't preserve symlinks Nov 30, 2018
@honza-kasik
Copy link
Contributor Author

honza-kasik commented Nov 30, 2018

@jan-onderka Thanks for pointing this out, I edited the issue. Although man page of unzip says following:

       Dates,  times  and  permissions  of stored directories are not restored
       except under Unix. (On Windows NT and successors,  timestamps  are  now
       restored.)

Because NOE core supports multiple platforms, preserving filesystem permissions is not expected feature from unzip.

@honza-kasik
Copy link
Contributor Author

honza-kasik commented Dec 3, 2018

I started to stitch something together using Commons Compress which should support symlinks to see if it can become our replacement for Ant.

@m-czernek
Copy link
Contributor

m-czernek commented Dec 3, 2018

That would be quite interesting, especially if that means we can drop the huge Ant jar we're carrying, which accounts for something like 80% of Noe Core's artifact size.

Edit: Also, their license is compatible with ours, so it's a fit imho. The main question is, how will it behave on Windows and Solaris...

@jstefl
Copy link
Collaborator

jstefl commented Dec 5, 2018

Zip archive by design doesn't preserve file system permissions.

@jan-onderka This is based on what, please? I don't think that is true.

We always took advantage of 'native' unzip to unpack tested product with original access rights (on RHEL and Solaris) (for instance, executable permission was lost on scripts when and was used). On Windows, ant was used since there is no (no cygwin) unzip installed. However, windows and access rights is different story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants