basho / node_package

RPM/Debian/FreeBSD/SmartOS/Solaris/OSX packaging templates for Erlang Nodes
Apache License 2.0
89 stars 63 forks source link

Force correct permissions on Debian package files in /usr/lib/ #201

Closed nickelization closed 8 years ago

nickelization commented 8 years ago

One of our build machines was set up differently from the VM we used to test the recent permissions fixes, and it ended up creating a package with some files set to 600 and 700 because of the permissions on the directory it used to do the build. This fix should prevent such issues from happening again in the future, as it explicitly forces correct permissions on the affected files, regardless of what permissions those files happened to be created with at build time.

nickelization commented 8 years ago

Actually, I should've been more specific in the PR description. The issue we saw was only on certain specific files (mostly the *.schema files). All of those files are covered by this patch, but there are directories (and other files outside of /usr/lib/) that aren't covered by this PR since we haven't had any issues with them. Not sure whether it's worth trying to cover all our bases though, or if maybe this fix alone is good enough in practice.

nickelization commented 8 years ago

Added a few more commits to cover additional cases where files and directories could end up with overly restrictive permissions. I was able to run "make package" under Riak on Ubuntu and the resulting package worked great using this code.

jadeallenx commented 8 years ago

👍 0a11af7

jadeallenx commented 8 years ago

Tested and validated on ubuntu 14.04 and riak 2.1.3