maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject [rpm-maven-plugin] Howto set directory mode of a mapping directory which has files?
Date Mon, 07 Dec 2015 23:33:52 GMT
Maybe I'm missing something, but there seems to be a hole in the logic 
of the rpm-maven-plugin mappings, and
the way file permissions are created.

Looking at the official documentation, 
http://www.mojohaus.org/rpm-maven-plugin/map-params.html, I see


      filemode(*recommended*)

This is UNIX permissions (file mode) to assign to the files when 
installed. This value consists of three octal digits representing the 
access for the owner, the group, and the world. Each digit represents 
the access allowed and is the sum of 4 for read, 2 for write, and 1 for 
execute. A common value to use is "644" which provides the owner 
read/write access and read-only access to everyone else. For more 
information on this subject, readFile Security 
<http://www.tldp.org/LDP/intro-linux/html/sect_03_04.html>, section 3.4 
of the Introduction to Linux maintained by the Linux Documentation 
Project. If not specified, the files retain the filemode assigned to 
them when copied to the RPM work area.

If none of the file attributes (filemode, username, and groupname) are 
populated, the defaults (defaultFileMode 
<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultFilemode>,defaultUsername

<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultUsername>,defaultGroupname

<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultGroupname>, 
anddefaultDirmode 
<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultDirmode>) 
will be used.


      username(*recommended*)

This is the UNIX username to assign to the files when installed. If the 
named user does not exist when the package is installed, the 
userrootwill be used. If not specified, the files will be owned by the 
user used to create the package.

If none of the file attributes (filemode, username, and groupname) are 
populated, the defaults (defaultFileMode 
<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultFilemode>,defaultUsername

<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultUsername>,defaultGroupname

<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultGroupname>, 
anddefaultDirmode 
<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultDirmode>) 
will be used.


      groupname(*recommended*)

This is the UNIX groupname to assign to the files when installed. If the 
named group does not exist when the package is installed, the 
grouprootwill be used. If not specified, the files will be owned by the 
group used to create the package.

If none of the file attributes (filemode, username, and groupname) are 
populated, the defaults (defaultFileMode 
<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultFilemode>,defaultUsername

<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultUsername>,defaultGroupname

<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultGroupname>, 
anddefaultDirmode 
<http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultDirmode>) 
will be used.


But there is no dirmode parameter on the individual mapping.  So, if I 
set a filemode of 644 on a file mapping, its directory is created with 
644 permissions, and I don't see how with these rules to get around 
that, other than to avoid the use of filemode, username, and groupname 
on mappings, and go with the defaults, which would probably be adequate 
in most cases.  Given this sort of logic and given that mappings require 
a directory to be specified, shouldn't there be a dirmode parameter for 
mappings?  Or is there such a a parameter and this is just a 
documentation error?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message