提交 05ba4488 编写于 作者: J Jonathan Nieder 提交者: Michal Marek

scripts/package: add KBUILD_PKG_ROOTCMD variable

Let the deb-pkg target acquire (fake) root privileges before
running commands that need them.  Without such privileges,
deb-pkg errors out because chown fails.

The new KBUILD_PKG_ROOTCMD variable, if defined, is used as a
command to run other commands with possibly fake elevated
privileges.  Since this is not needed for the tar-pkg and rpm-pkg
targets, it is only used by deb-pkg.  If it is not defined, the
behavior is as before, and the user will have to rerun make as
root.

In other words, as a shortcut, instead of running 'make oldconfig &&
make && fakeroot -u make deb-pkg', one can use the single command
'make oldconfig deb-pkg KBUILD_PKG_ROOTCMD="fakeroot -u"'.
Suggested-by: NRyan Anderson <ryan@michonline.com>
Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 91d16185
...@@ -79,7 +79,8 @@ clean-files += $(objtree)/binkernel.spec ...@@ -79,7 +79,8 @@ clean-files += $(objtree)/binkernel.spec
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
deb-pkg: FORCE deb-pkg: FORCE
$(MAKE) KBUILD_SRC= $(MAKE) KBUILD_SRC=
$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb $(KBUILD_PKG_ROOTCMD) $(CONFIG_SHELL) \
$(srctree)/scripts/package/builddeb
clean-dirs += $(objtree)/debian/ clean-dirs += $(objtree)/debian/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册