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
When configuring into-from CopySpec details for the ospackage/buildRpm, fileMode can be set for all files applicable to the the copy. There may be a need to set different file permissions on individual files. This can be accomplished through FileCopyDetails.setMode(), under a filesMatching(..) block. Gradle's native distribution plugin output from installDist respects the individually set modes, but the RPM doesn't.
The RpmCopyAction.visitFile looks like it will always apply the fileMode from the spec - would I be wrong in thinking visitFile(..) should not reference the spec's fileMode at all, and always rely on the fileDetails.mode?
int fileMode = lookup(specToLookAt, 'fileMode') ?: fileDetails.mode
becomes
int fileMode = fileDetails.mode
The text was updated successfully, but these errors were encountered:
When configuring into-from CopySpec details for the ospackage/buildRpm, fileMode can be set for all files applicable to the the copy. There may be a need to set different file permissions on individual files. This can be accomplished through FileCopyDetails.setMode(), under a filesMatching(..) block. Gradle's native distribution plugin output from installDist respects the individually set modes, but the RPM doesn't.
installDist output and expected outcome - the .sh script is 0700
Installed RPM output - the .sh script gets the spec's fileMode 0640
https://github.com/nebula-plugins/gradle-ospackage-plugin/blob/ae9152c02ca066b0a3da99e6ccb7da46a083cb9d/src/main/groovy/com/netflix/gradle/plugins/rpm/RpmCopyAction.groovy#LL164C16-L164C16
The RpmCopyAction.visitFile looks like it will always apply the fileMode from the spec - would I be wrong in thinking visitFile(..) should not reference the spec's fileMode at all, and always rely on the fileDetails.mode?
int fileMode = lookup(specToLookAt, 'fileMode') ?: fileDetails.mode
becomes
int fileMode = fileDetails.mode
The text was updated successfully, but these errors were encountered: