diff mbox series

scripts/package/mkdebian: expose KCONFIG_CONFIG to debian/rules

Message ID 20190221215901.23970-3-ar@cs.msu.ru (mailing list archive)
State New, archived
Headers show
Series scripts/package/mkdebian: expose KCONFIG_CONFIG to debian/rules | expand

Commit Message

Arseny Maslennikov Feb. 21, 2019, 9:58 p.m. UTC
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(+)

Comments

Petr Vorel March 1, 2019, 1:32 p.m. UTC | #1
Hi,

> 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

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>


Kind regards,
Petr
Masahiro Yamada March 7, 2019, 3:29 p.m. UTC | #2
On Fri, Feb 22, 2019 at 7:21 AM Arseny Maslennikov <ar@cs.msu.ru> wrote:
>
> 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



I am not convinced with this patch.

People would be upset if they got a source package and
they  did not find the .config in the standard location.

It is difficult to notice the .config has been moved
to somewhere until they check debian/rules.

Why do we need to create such a strange package?





> 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
>


--
Best Regards
Masahiro Yamada
diff mbox series

Patch

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: