mojohaus / rpm-maven-plugin

http://www.mojohaus.org/rpm-maven-plugin/
Other
56 stars 48 forks source link

Cannot override directory file mode when they are set with defaultDirmode #46

Open rmottus opened 8 years ago

rmottus commented 8 years ago

If I provide a defaultDirmode then I cannot override the directory file mode in a mapping (i.e. it always gets the defaultDirmode). Overriding the defaultUsername and defaultGroupname work for a directory, but even if the mapping is for the directory only, the installed directory gets the defaultDirmode and not what I set as filemode in the mapping. I ran into this issue in the last week using the latest rpm plugin. I think that it's a plugin issue and not an RPM issue, but I'm not sure.

This issue combined with #33 and the fact that I have a lot of directories that I'm installing is a big pain and makes using the plugin very clunky. I had to choose between having all directories with the same permission or specify a mapping for each directory, which is a rather silly choice to have to make. I ended up needing to chmod some directories in my postinstall to get the permissions that I wanted, which is an anti-pattern.

Making a change so that I can override defaultDirmode or providing a dirmode option on mappings as discussed in #33 (better yet both!) would make life a lot easier.