Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2535641ybi; Thu, 4 Jul 2019 13:16:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqykyt4F4XVGiDU0IPKWPuG89tosyzx5ujf+hKPWHDKUkXC0iAKoF3s0EMnJZ6/3+zTnbe8B X-Received: by 2002:a17:90a:372a:: with SMTP id u39mr1453184pjb.2.1562271365672; Thu, 04 Jul 2019 13:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562271365; cv=none; d=google.com; s=arc-20160816; b=RcQeBGNKODsexfRtnbjdPkFIrZ070AxPd4rABrod6VQtVVVTxEDMSn8YmDxpIHJlWJ qLl5IomDe93lTtMLj2ttBli+FrUUCQmaw2zr1LP75h4hrV5HWfvAtRz6/oRhGfr8fo7O DXKI5aUMhXxpEvyXdStgtjegYaawenXYwENOt6AmQYL8BlZve4NT86aCmsR+aiK5jZp1 vErV5a+r4C38Horqv0bj4uVeKIp7LfBcf4GQJTd4oWqRFGfV86ZqmwyrQttEgw7yd+cf 1nk1Qz0upkZNFHMObQOdLdoLrSezwOmj+FXioAiKORbkdl87dBdxN+E5aZ+5HCyQmDkb FWpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=Lan4Oyeynsr68e9IcZKhFXatGcacNGe9ZeX7QuLPlRo=; b=Abi/kh6HvKtVrj+MlDeYE3Awp5va8Kgp5i+y1NIb+4ZyhnFiswdKGdxAbtELGxVDuS 5fKr9yWp3rvcjXVIc3qGHt4YVeG1P0BWMysv4VFaJEmbTAXvoIYBsx/Geu2nvRt26OZs 9yOhRFIPxY8YTwkweQEM8G9JLfUvhAeH1Stx3rnQa+Gkx65LuFdrBxy7chcE71doIcSC ATDjVzDeuB9rdI5Sgk1GCREkQ0T5dgqUmMkyPxkNKiBpmM18gcXUszzH87S4f0vDwo55 UEMuqwBG8kR/4JuGz1gf0hkdpGbDACEVF62eX2hhpN5eTAv3XVSKtah3I8wvGOe6PDlk vtzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c18si5415207pfd.144.2019.07.04.13.15.48; Thu, 04 Jul 2019 13:16:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbfGDTt5 (ORCPT + 99 others); Thu, 4 Jul 2019 15:49:57 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35162 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbfGDTt5 (ORCPT ); Thu, 4 Jul 2019 15:49:57 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hj7jr-0003HC-Uq; Thu, 04 Jul 2019 20:49:52 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hj7jr-0007vM-EP; Thu, 04 Jul 2019 20:49:51 +0100 Message-ID: <432e997617a0669886cd9ea5ceac7c1a2173044b.camel@decadent.org.uk> Subject: Re: [PATCH v2] builddeb: generate multi-arch friendly linux-libc-dev package From: Ben Hutchings To: Cedric Hombourger Cc: yamada.masahiro@socionext.com, isar-users@googlegroups.com, michal.lkml@markovi.net, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, riku.voipio@linaro.org Date: Thu, 04 Jul 2019 20:49:51 +0100 In-Reply-To: <1562269332-132-1-git-send-email-Cedric_Hombourger@mentor.com> References: <0ff3202ced2b501d6045157f1c7b50810c0571e5.camel@decadent.org.uk> <1562269332-132-1-git-send-email-Cedric_Hombourger@mentor.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-cA+bfsGVarVXhzkxUgz3" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-cA+bfsGVarVXhzkxUgz3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2019-07-04 at 21:42 +0200, Cedric Hombourger wrote: > Debian-based distributions place libc header files in a machine > specific directory (/usr/include/) instead of > /usr/include/asm to support installation of the linux-libc-dev > package from multiple architectures. Move headers installed by > "make headers_install" accordingly using Debian's tuple from > dpkg-architecture. >=20 > Signed-off-by: Cedric Hombourger > Reviewed-by: Henning Schild > Reviewed-by: Ben Hutchings I haven't reviewed this version of the patch. And this doesn't make a multi-arch package; you will have to add a field to the package's control file too. Ben. > --- > scripts/package/builddeb | 8 ++++++++ > scripts/package/mkdebian | 4 ++-- > 2 files changed, 10 insertions(+), 2 deletions(-) >=20 > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index b03dd56a4782..15a034e18c37 100755 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -132,6 +132,14 @@ fi > if [ "$ARCH" !=3D "um" ]; then > $MAKE -f $srctree/Makefile headers_check > $MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH=3D"$libc_he= aders_dir/usr" > + if [ -n "$debarch" ]; then > + # move asm headers to /usr/include//asm to match the str= ucture > + # used by Debian-based distros (to support multi-arch) but only if ARC= H was > + # translated to Debian's (debarch) - this is done by mkdebian > + host_arch=3D$(dpkg-architecture -a$debarch -qDEB_HOST_MULTIARCH) > + mkdir $libc_headers_dir/usr/include/$host_arch > + mv $libc_headers_dir/usr/include/asm $libc_headers_dir/usr/include/$ho= st_arch/ > + fi > fi > =20 > # Install the maintainer scripts > diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian > index 8351584cb24e..8ebcb7d67fd2 100755 > --- a/scripts/package/mkdebian > +++ b/scripts/package/mkdebian > @@ -212,11 +212,11 @@ cat < debian/rules > srctree ?=3D . > =20 > build: > - \$(MAKE) KERNELRELEASE=3D${version} ARCH=3D${ARCH} \ > + \$(MAKE) KERNELRELEASE=3D${version} ARCH=3D${ARCH} debarch=3D${debarch}= \ > KBUILD_BUILD_VERSION=3D${revision} -f \$(srctree)/Makefile > =20 > binary-arch: > - \$(MAKE) KERNELRELEASE=3D${version} ARCH=3D${ARCH} \ > + \$(MAKE) KERNELRELEASE=3D${version} ARCH=3D${ARCH} debarch=3D${debarch}= \ > KBUILD_BUILD_VERSION=3D${revision} -f \$(srctree)/Makefile intdeb-pkg > =20 > clean: --=20 Ben Hutchings Quantity is no substitute for quality, but it's the only one we've got. --=-cA+bfsGVarVXhzkxUgz3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAl0eWF8ACgkQ57/I7JWG EQk4AA/9G5jY7ubQDfOO6pEMnOMb1V6QBMMDT+eIBVyiXxW4xBN7yFz6WjKLTC+k mYeNcPWL1iI0Tl9LpAmsOKHffJYc1BWbjo46gDk1nP5s6V/Mc8qXVhKcHSYWTjnI 3upub1vcb6dWvimjeOubCCSM6mvwrRyxibwO7Cqr/vuWfcFK4JG5/bO9+3nri9zX RKR2746PLfg5UBU1GrBvEtgBV5bXmOX11j6APOre9GHEw6j5zKB95jF+ufL6opqM 3KcRmg8gj+khqtOWoLMKc/U3cn4zvEmgROyU6Dv32c6EXD73AKov8A36WD5BwHb6 YtJ3MrfNFMSPgFTM3K/+vRTmwoV9bUcK4b4yhrl64yOMjk2GkuilO3o9+sDTmHiY KRWQjeVbWMd2z4QlGYzcJ5qfxljuSegEzISnUhZcEAb7pxzPmq/CvJGGE0iSdQqa 2PC6jTXcM3ELZOmXIRcnTi8sog8DG7b3J2a/dHVnqkeklqRZBg/w9uTAcSvxKLv3 UnYhfj0bn0fFTZgfGoFWYkZSSk2vnXTJbYEGrzjDIhqTaW5xwU+9pMKwngO47ny0 vcNqsg6VDLzjFNWyGBt8pOq3DIq0Ud1D/j8c5Fod+Jlz3ScF3KLhq2YSqjU9iBVC k5Tj8F/AR4HsjR7bJJ5YDO7fzpeHJj6ClCP1PqUEelc41hIK2bA= =MsmZ -----END PGP SIGNATURE----- --=-cA+bfsGVarVXhzkxUgz3--