You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
We want to be able to have the spec file to explicitly define every directory and sub-directory with specific permissions. We have historically accomplished this by having a top level mapping defining the top level directory with no sources, directoryIncluded set to true and recurse directories set to true.
This is then followed by various mappings which land files and directories under /usr/myuser/appDir, all of which have directoryIncluded set to false. I am pretty certain this worked when directoryIncluded and recurseDirectories were originally added.
Now, however, it appears[1] that if recurseDirectories is true, all of the files will be listed explicitly. Not only is this not desired (by virtue of fact that no sources were defined), it is also incorrectly defining the files as directories. This latter point is because the baseFileString[2] is obtained from the Mapping[3], which (rightly) believes it is only describing directories.
So if we take the above example, and then have another mapping which attempts to land someFile into /usr/myuser/appDir with 644 permissions, the result is the following in the spec file:
Since this has been merged, is this still an open issue?
This issue is impacting newer versions of rpmbuild. If a file in the spec is incorrectly marked as a directory, newer versions of rpmbuild will fail. For my projects, this is causing builds to fail in our automation.
When can we expect a new release of the plugin with this fix in it? Thanks!
We want to be able to have the spec file to explicitly define every directory and sub-directory with specific permissions. We have historically accomplished this by having a top level mapping defining the top level directory with no sources, directoryIncluded set to true and recurse directories set to true.
This is then followed by various mappings which land files and directories under /usr/myuser/appDir, all of which have directoryIncluded set to false. I am pretty certain this worked when directoryIncluded and recurseDirectories were originally added.
Now, however, it appears[1] that if recurseDirectories is true, all of the files will be listed explicitly. Not only is this not desired (by virtue of fact that no sources were defined), it is also incorrectly defining the files as directories. This latter point is because the baseFileString[2] is obtained from the Mapping[3], which (rightly) believes it is only describing directories.
So if we take the above example, and then have another mapping which attempts to land
someFile
into /usr/myuser/appDir with 644 permissions, the result is the following in the spec file:[1] - https://github.com/mojohaus/rpm-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/rpm/SpecWriter.java#L275
[2] - https://github.com/mojohaus/rpm-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/rpm/SpecWriter.java#L179
[3] - https://github.com/mojohaus/rpm-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/rpm/Mapping.java#L413
The text was updated successfully, but these errors were encountered: