diff mbox series

[4/7] builddeb: Add support for all required debian/rules targets

Message ID 20200920222556.10002-5-guillem@hadrons.org (mailing list archive)
State New, archived
Headers show
Series builddeb: Improve Debian packaging | expand

Commit Message

Guillem Jover Sept. 20, 2020, 10:25 p.m. UTC
These have been required by the Debian policy for a while, even though
the tooling can detect and workaround their omission, but are a hard
requirement when using rootless builds.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
---
 scripts/package/mkdebian | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Masahiro Yamada Oct. 9, 2020, 3:46 p.m. UTC | #1
On Mon, Sep 21, 2020 at 7:48 AM Guillem Jover <guillem@hadrons.org> wrote:
>
> These have been required by the Debian policy for a while, even though
> the tooling can detect and workaround their omission, but are a hard
> requirement when using rootless builds.
>


Applied to linux-kbuild. Thanks.


I added a little more explanation about why this patch is needed.

[masahiro:
The following Debian policy is particularly important for rootless builds:
"Both binary-* targets should depend on the build target, or on the
 appropriate build-arch or build-indep target, so that the package is
 built if it has not been already."
]






> Signed-off-by: Guillem Jover <guillem@hadrons.org>
> ---
>  scripts/package/mkdebian | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index 69f2a6d7f009..dae6c0ec0bd6 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -231,11 +231,15 @@ cat <<EOF > debian/rules
>
>  srctree ?= .
>
> -build:
> +build-indep:
> +build-arch:
>         \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
>         KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile
>
> -binary-arch:
> +build: build-arch
> +
> +binary-indep:
> +binary-arch: build-arch
>         \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
>         KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile intdeb-pkg
>
> --
> 2.28.0.297.g1956fa8f8d
>
diff mbox series

Patch

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 69f2a6d7f009..dae6c0ec0bd6 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -231,11 +231,15 @@  cat <<EOF > debian/rules
 
 srctree ?= .
 
-build:
+build-indep:
+build-arch:
 	\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
 	KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile
 
-binary-arch:
+build: build-arch
+
+binary-indep:
+binary-arch: build-arch
 	\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
 	KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile intdeb-pkg