diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2009-11-24 10:14:41 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2009-12-12 07:08:15 -0500 |
commit | 05ba4488a51edde95df3f89987fdcdbca7c3cebb (patch) | |
tree | 286567a54dd2968f3a32e3e77f5a29d78854ca79 /scripts | |
parent | 91d161857ce9672bd2a8cd99ff712a67186e2e76 (diff) |
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: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/package/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index f67cc885c807..5c0b43aaf63b 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -79,7 +79,8 @@ clean-files += $(objtree)/binkernel.spec | |||
79 | # --------------------------------------------------------------------------- | 79 | # --------------------------------------------------------------------------- |
80 | deb-pkg: FORCE | 80 | deb-pkg: FORCE |
81 | $(MAKE) KBUILD_SRC= | 81 | $(MAKE) KBUILD_SRC= |
82 | $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb | 82 | $(KBUILD_PKG_ROOTCMD) $(CONFIG_SHELL) \ |
83 | $(srctree)/scripts/package/builddeb | ||
83 | 84 | ||
84 | clean-dirs += $(objtree)/debian/ | 85 | clean-dirs += $(objtree)/debian/ |
85 | 86 | ||