Commit 53243e09 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: deb-pkg: remove the fakeroot builds support

In 2017, the dpkg suite introduced the rootless builds support with the
following commits:

  - 2436807c87b0 ("dpkg-deb: Add support for rootless builds")
  - fca1bfe84068 ("dpkg-buildpackage: Add support for rootless builds")

This feature is available in the default dpkg on Debian 10 and Ubuntu
20.04.

Remove the old method.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 5b20755b
...@@ -109,8 +109,6 @@ debian-orig: linux.tar$(debian-orig-suffix) debian ...@@ -109,8 +109,6 @@ debian-orig: linux.tar$(debian-orig-suffix) debian
cp $< ../$(orig-name); \ cp $< ../$(orig-name); \
fi fi
KBUILD_PKG_ROOTCMD ?= 'fakeroot -u'
PHONY += deb-pkg srcdeb-pkg bindeb-pkg PHONY += deb-pkg srcdeb-pkg bindeb-pkg
deb-pkg: private build-type := source,binary deb-pkg: private build-type := source,binary
...@@ -125,7 +123,7 @@ deb-pkg srcdeb-pkg bindeb-pkg: ...@@ -125,7 +123,7 @@ deb-pkg srcdeb-pkg bindeb-pkg:
$(if $(findstring source, $(build-type)), \ $(if $(findstring source, $(build-type)), \
--unsigned-source --compression=$(KDEB_SOURCE_COMPRESS)) \ --unsigned-source --compression=$(KDEB_SOURCE_COMPRESS)) \
$(if $(findstring binary, $(build-type)), \ $(if $(findstring binary, $(build-type)), \
-R'$(MAKE) -f debian/rules' -j1 -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \ -R'$(MAKE) -f debian/rules' -j1 -a$$(cat debian/arch), \
--no-check-builddeps) \ --no-check-builddeps) \
$(DPKG_FLAGS)) $(DPKG_FLAGS))
......
...@@ -36,19 +36,13 @@ create_package() { ...@@ -36,19 +36,13 @@ create_package() {
sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \ sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \
| xargs -r0 md5sum > DEBIAN/md5sums" | xargs -r0 md5sum > DEBIAN/md5sums"
# Fix ownership and permissions
if [ "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then
dpkg_deb_opts="--root-owner-group"
else
chown -R root:root "$pdir"
fi
# a+rX in case we are in a restrictive umask environment like 0077 # a+rX in case we are in a restrictive umask environment like 0077
# ug-s in case we build in a setuid/setgid directory # ug-s in case we build in a setuid/setgid directory
chmod -R go-w,a+rX,ug-s "$pdir" chmod -R go-w,a+rX,ug-s "$pdir"
# Create the package # Create the package
dpkg-gencontrol -p$pname -P"$pdir" dpkg-gencontrol -p$pname -P"$pdir"
dpkg-deb $dpkg_deb_opts ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" .. dpkg-deb --root-owner-group ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
} }
install_linux_image () { install_linux_image () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment