Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #58973
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Newsgroups | linux.debian.kernel |
| Subject | Re: [PATCH 2/2] scripts/package/builddeb: split generating packaging and build |
| Date | 2017-09-22 06:50 +0200 |
| Message-ID | <uso4y-1K3-3@gated-at.bofh.it> (permalink) |
| References | <uf4Gm-6q1-33@gated-at.bofh.it> <uf4Gm-6q1-31@gated-at.bofh.it> <urJup-15w-5@gated-at.bofh.it> <urKTw-1Wj-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Riku
2017-09-20 19:35 GMT+09:00 Riku Voipio <riku.voipio@linaro.org>:
>>> bindeb-pkg: FORCE
>>> - $(MAKE) KBUILD_SRC=
>>> - +$(call cmd,builddeb)
>>> + $(call cmd,updateversion)
>>> + $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
>>> + dpkg-buildpackage -r"fakeroot -u" -a$$(cat debian/arch) -b
>>
>> IIUC, the whole of dpkg-buildpackage process is run under "fakeroot -u".
>> Correct?
>
> No, dpkg-buildpackage will call -rfakeroot only for binary-arch targets
You are right.
I tested this and seems to work so.
>> It will internally invokes "make intdeb-pkg",
>> then $(call cmd,builddeb) calls "fakeroot -u" recursively,
>> this seems redundant to me.
>
> it wont, since it's checks if if = 0 - which will be true under. But
> all this can be indeed removed
> if we can call builddeb directly as discussed below.
Right.
I missed that id -u is already 0 in this case.
>> Maybe,
>>
>> dpkg-buildpackage -r"$(KBUILD_PKG_ROOTCMD)" -a$$(cat debian/arch) -b
>>
>> makes more sense?
>
>>> +
>>> +cat <<EOF > debian/rules
>>> +#!/usr/bin/make -f
>>> +
>>> +ifneq (,\$(filter parallel=%,\$(DEB_BUILD_OPTIONS)))
>>> + NUMJOBS = \$(patsubst parallel=%,%,\$(filter parallel=%,\$(DEB_BUILD_OPTIONS)))
>>> + MAKEFLAGS += -j\$(NUMJOBS)
>>> +endif
>>> +
>>> +build:
>>> + \$(MAKE) ARCH=${ARCH}
>>> +
>>> +binary-arch:
>>> + \$(MAKE) KDEB_VERSION=${version} ARCH=${ARCH} intdeb-pkg
>>
>>
>> Hmm, instead of recursive make,
>> is it possible to run scripts/package/debuild directly here?
>
> I though it's not possible because I need variables from kernel make.
> Now that I check, I see only $KCONFIG_CONFIG which I think we can
> assume to be .config. Also some ARCH and SRCARCH variables which are
> hardcoded anyways in mkdebian. I'll try.
Most of the variables are exported from the top-level Makefile.
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
....
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
So, I think you can refer $KCONFIG_CONFIG from scripts/package/debuild.
(I have not tested it, though...)
--
Best Regards
Masahiro Yamada
Back to linux.debian.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] scripts/package/builddeb: split generating packaging and build riku.voipio@linaro.org - 2017-08-16 13:30 +0200
Re: [PATCH 2/2] scripts/package/builddeb: split generating packaging and build Jim Davis <jim.epost@gmail.com> - 2017-08-17 02:50 +0200
Re: [PATCH 2/2] scripts/package/builddeb: split generating packaging and build Riku Voipio <riku.voipio@linaro.org> - 2017-08-17 10:10 +0200
Re: [PATCH 2/2] scripts/package/builddeb: split generating packaging and build Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-20 11:30 +0200
Re: [PATCH 2/2] scripts/package/builddeb: split generating packaging and build Riku Voipio <riku.voipio@linaro.org> - 2017-09-20 13:00 +0200
Re: [PATCH 2/2] scripts/package/builddeb: split generating packaging and build Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-22 06:50 +0200
csiph-web