提交 ca617dc6 编写于 作者: H Henning Schild 提交者: Michal Marek

builddeb: fix file permissions before packaging

Builddep is not very explicit about file permissions. Actually the file
permissions in the package are largely influenced by the umask of the
user cloning the git and building the package. If that umask does not
set go+r the resulting linux-headers package will prevent non-root users
from building out-of-tree modules. And that is probably just one
unexpected effect.
Being a packaging/install tool builddep should make sure the file
permissions are set correctly and not just derived from a value that is
never checked.

This patch sets ugo read permissions for all packaged files and derives
the executable bit for directories and executables from the file-owner.
Signed-off-by: NHenning Schild <henning.schild@siemens.com>
Signed-off-by: NMichal Marek <mmarek@suse.com>
上级 cc65e823
...@@ -26,6 +26,8 @@ create_package() { ...@@ -26,6 +26,8 @@ create_package() {
# Fix ownership and permissions # Fix ownership and permissions
chown -R root:root "$pdir" chown -R root:root "$pdir"
chmod -R go-w "$pdir" chmod -R go-w "$pdir"
# in case we are in a restrictive umask environment like 0077
chmod -R a+rX "$pdir"
# Create the package # Create the package
dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname -P"$pdir" dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname -P"$pdir"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册