-
Notifications
You must be signed in to change notification settings - Fork 324
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
The deb task doesn't preserve the filesystem permissions #55
Comments
Could you try again by replacing the data element with a fileset? It should preserve the permissions.
|
Actually the right solution is to use a tarfileset. Until jdeb uses the Java 7 nio2 API it's not possible to preserve the permissions from the filesystem. |
Even a tar fileset won't work, because different things on the data dir (or indeed the control dir, where i didn't see the option to use a tar) need different permissions and tarfileset sets them to all the files. If i gave a (exec-ed) tar file would it work? BTW, i don't mind using java 7. In fact, the best option might be a fork. Where in the code do you copy files? |
It looks pretty gnarly. You only use inputstreams. I wonder if there is a wrapper output stream that saves file permissions and reapplies them on the end |
You can use several tarfilesets, one per type of permission, or you can use a permission mapper. There are some examples in the documentation : https://github.com/tcurdt/jdeb/blob/master/docs/ant.md |
What about the control directory? |
Now i'm confused too: there are a number of files in that article (changelog, .desktop) that i was putting in their final directories in the data instead of the control directory. Will jdeb do the right thing on this or is it too distribution specific? |
The .desktop file has to be put in the right directory (typically into |
Bummer i was hoping that the distro installer did (and that jdeb exposed the mapping variable mechanism so i could use the [[]] syntax in all control/** files) |
What is the best way to address the permission issue in a Maven build? |
I'm interested in providing a fix for this issue. Would you be interested by such a contribution? |
@prapicault what kind of fix do you have in mind? |
I wanted to create a new mapper that would obtain the permission from the file system using java 7 API (https://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/package-summary.html). |
@prapicault we already had such a contribution. maybe check the old issues. The main problem is that 1.x should stay on java6. For 2.x I am more than open for such functionality! The current config file discussion happens here. |
I whenever i tried to build, even with this:
http://pastebin.com/raw.php?i=FmMaXiux
When i used lintian
BUILD SUCCESSFUL
Total time: 27 seconds
E: bookjar: control-file-has-bad-permissions conffiles 0755 != 0644
W: bookjar: extended-description-line-too-long
E: bookjar: non-standard-file-permissions-for-etc-init.d-script etc/init.d/bookjar 0644 != 0755
W: bookjar: script-not-executable etc/init.d/bookjar
(notice it reports etc/init.d/bookjar is not executable even though i was set explicitly before the deb task)
Whatever i do, whatever the permissions before the files go into the deb task it doesn't seem to change this, so i can only guess the task is modifying the files but not setting a appropriate permission back again.
The text was updated successfully, but these errors were encountered: