public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Arseny Maslennikov <ar@cs.msu.ru>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Arseny Maslennikov <ar@cs.msu.ru>,
	Ben Hutchings <ben@decadent.org.uk>,
	Riku Voipio <riku.voipio@linaro.org>
Subject: [PATCH] scripts/package/mkdebian: expose KCONFIG_CONFIG to debian/rules
Date: Fri, 22 Feb 2019 00:58:59 +0300	[thread overview]
Message-ID: <20190221215901.23970-3-ar@cs.msu.ru> (raw)
In-Reply-To: <20190221215901.23970-1-ar@cs.msu.ru>

If KCONFIG_CONFIG is passed to `make deb-pkg` as a makeflag or
environment variable, the source tarball produced contains whatever
specified by that variable instead of the usual `.config'.

While `make deb-pkg' yields a correct Debian binary package (at least
on amd64), the generated source package's debian/rules does not pass
KCONFIG_CONFIG to make(1), thus rendering the source package unable to
be rebuilt.

Steps to reproduce the kind of failure being fixed:
1)  Produce a source and binary package with:
	% KCONFIG_CONFIG=my.config make deb-pkg
2)  In the parent directory:
	% dpkg-source -x linux-*.dsc
3)  In the unpacked source directory:
	% debuild -i -us -uc

Here is an excerpt from an example output of `debuild -i -us -uc':

make[2]: *** No rule to make target '.config', needed by 'kernel/config_data.gz'.  Stop.
make[1]: *** [Makefile:1043: kernel] Error 2
make[1]: Leaving directory '/home/ar/linux-kernel/deb/linux-5.0.0-rc5-tks-gitd6ff78479ec5-57-5.0.0-rc5-tks-gitd6ff78479ec5-57'
make: *** [debian/rules:4: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i failed

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
 scripts/package/mkdebian | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index edcad61fe3cd..130d3f6696eb 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -207,10 +207,12 @@ cat <<EOF > debian/rules
 
 build:
 	\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
+	KCONFIG_CONFIG=${KCONFIG_CONFIG} \
 	KBUILD_BUILD_VERSION=${revision} KBUILD_SRC=
 
 binary-arch:
 	\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
+	KCONFIG_CONFIG=${KCONFIG_CONFIG} \
 	KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg
 
 clean:
-- 
2.20.1

  parent reply	other threads:[~2019-02-21 22:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 21:58 [PATCH] scripts/package/Makefile: put proper config in source tarball Arseny Maslennikov
2019-02-21 21:58 ` [PATCH] scripts/kconfig/Makefile: use KCONFIG_CONFIG if set Arseny Maslennikov
2019-03-01 12:33   ` Petr Vorel
2019-03-09 13:12   ` Arseny Maslennikov
2019-02-21 21:58 ` Arseny Maslennikov [this message]
2019-03-01 13:32   ` [PATCH] scripts/package/mkdebian: expose KCONFIG_CONFIG to debian/rules Petr Vorel
2019-03-07 15:29   ` Masahiro Yamada
2019-03-01 13:34 ` [PATCH] scripts/package/Makefile: put proper config in source tarball Petr Vorel
2019-03-07 15:32 ` Masahiro Yamada
2019-03-07 19:05   ` Arseny Maslennikov
2019-03-07 19:08     ` Arseny Maslennikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190221215901.23970-3-ar@cs.msu.ru \
    --to=ar@cs.msu.ru \
    --cc=ben@decadent.org.uk \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=riku.voipio@linaro.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox