It's quite annoying to explicitly specify file permissions when building an RPM, especially when files are collected from multiple sources maintained by different teams or there are many executable files in a directory, but not all of them. The problem is not only in having a long list of rules/entries, but also in having to track new files or file permission changes in all the sources.
The following is stated in the documentation:
This information is not read from the filesystem, since this may not work on some platforms. RPM does assume a POSIX like system, so building on a Windows system may not provide enough information to properly fill out all required information in the file.
which is a bit odd given that building RPM packages on Windows or on any other non-POSIX systems is quite rare. So I don't quite see why file permissions are not preserved if possible, by default.
It is suggested to make preserving file permissions the default behaviour on POSIX systems. Alternatively, there should be a global or an entry level configuration option (or both), for example:
<entry>
...
<mode>original</mode>
...
</entry>
It's quite annoying to explicitly specify file permissions when building an RPM, especially when files are collected from multiple sources maintained by different teams or there are many executable files in a directory, but not all of them. The problem is not only in having a long list of rules/entries, but also in having to track new files or file permission changes in all the sources.
The following is stated in the documentation:
which is a bit odd given that building RPM packages on Windows or on any other non-POSIX systems is quite rare. So I don't quite see why file permissions are not preserved if possible, by default.
It is suggested to make preserving file permissions the default behaviour on POSIX systems. Alternatively, there should be a global or an entry level configuration option (or both), for example: