[PATCH] builddeb: Fix build on non-Debian/Ubuntu distros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes make bindeb-pkg for RPM based distros, which don't have
dpkg-dev (and thus not /usr/bin/dpkg-buildpackage), which sets
$DEB_RULES_REQUIRES_ROOT.

Fixes: 3e8541803624 ("builddeb: Enable rootless builds")

Signed-off-by: Petr Vorel <petr.vorel@xxxxxxxxx>
---
Hi,

I admit not many people compile kernel with bindeb-pkg on  RPM based
distro, but it'd be nice it were working.

openSUSE has most of other required packages, although there are some
missing dependencies, thus DPKG_FLAGS="-d" is needed.

Kind regards,
Petr

 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 1b11f8993629..287e4bbd222c 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -37,7 +37,7 @@ create_package() {
 		| xargs -r0 md5sum > DEBIAN/md5sums"
 
 	# Fix ownership and permissions
-	if [ "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then
+	if [ -z "$DEB_RULES_REQUIRES_ROOT" -o "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then
 		dpkg_deb_opts="--root-owner-group"
 	else
 		chown -R root:root "$pdir"
-- 
2.27.0.rc0




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux