Skip to contentSkip to conversation

builddeb: Fix packaged file permissions

PATCH In review Ben Hutchings 2 participants 2 messages Sep 3, 2009 – Sep 4, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 builddeb: Fix packaged file permissions

The packaged files' permissions are implicitly dependent on the current umask. Not only can this result in surprisingly restrictive permissions, but dpkg-deb will fail if the DEBIAN directory does not have permissions 755 or 775. Therefore, set the umask to 022 before building a package.

---
 scripts/package/builddeb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
scripts/package/builddeb +2 -0
index 8b357b0..24cfd80 100644
@@ -12,6 +12,8 @@
 
 set -e
 
+umask 022
+
 create_package() {
 	local pname="$1" pdir="$2"
 
Signature · 1 line
1.6.3.3
Acked-by on v1 1/1
#1 lore raw

Added linux-kbuild to CC.

Quoted 7 lines · Ben Hutchings

The packaged files' permissions are implicitly dependent on the current umask. Not only can this result in surprisingly restrictive permissions, but dpkg-deb will fail if the DEBIAN directory does not have permissions 755 or 775. Therefore, set the umask to 022 before building a package.

Quoted 17 lines
---
 scripts/package/builddeb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
scripts/package/builddeb +2 -0
index 8b357b0..24cfd80 100644
@@ -12,6 +12,8 @@
 
 set -e
 
+umask 022
+
 create_package() {
 	local pname="$1" pdir="$2"