builddeb: Fix rootless build in setuid/setgid directory
authorSven Joachim <svenjoac@gmx.de>
Mon, 26 Oct 2020 19:32:16 +0000 (20:32 +0100)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 2 Nov 2020 02:31:00 +0000 (11:31 +0900)
commitd1889589a4f54b2d1d7075d608b596d6fcfd3d96
tree65359c7b6065c19ac8bd31661fd18cbc4fa683b1
parentd9b5665fb3c822730857ba9119ead8b5e5ff967d
builddeb: Fix rootless build in setuid/setgid directory

Building 5.10-rc1 in a setgid directory failed with the following
error:

dpkg-deb: error: control directory has bad permissions 2755 (must be
>=0755 and <=0775)

When building with fakeroot, the earlier chown call would have removed
the setgid bits, but in a rootless build they remain.

Fixes: 3e8541803624 ("builddeb: Enable rootless builds")
Cc: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Sven Joachim <svenjoac@gmx.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/builddeb