sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 439 forks source link

LinuxPlugin: Config files are not set as config if have execute permission #1382

Closed SalehDehqanpour closed 3 years ago

SalehDehqanpour commented 3 years ago

Expected behaviour

sbt debian:packageBin should set meta "config" flag (in linuxPackageMappings) for all config files (i.e. those under "conf" directory) so they will be put in debian conffiles (and for other usages of the flag). Obviously the permission of files should not affect this.

Actual behaviour

sbt debian:packageBin will not put files under "conf" directory if they have execute permission set. So the conffiles does not contain them and this will cause problem when using that deb for upgrade purposes. This problem specially will occur when using Windows platform to generate packages (by using JDeb for example) because Windows has no notion of that permissions and by default all files are "777".

The issue is because of this line. The files are categorized sequentially in "executable", "doc", ... . But the order is wrong. Any file under conf should not be executable.

Information

muuki88 commented 3 years ago

Thanks for the detailed issue and the PR :heart: in #1383