From patchwork Mon Apr 14 12:19:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 3980351 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4DE039F2BA for ; Mon, 14 Apr 2014 12:20:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BE16201B4 for ; Mon, 14 Apr 2014 12:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8549720171 for ; Mon, 14 Apr 2014 12:20:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751519AbaDNMUT (ORCPT ); Mon, 14 Apr 2014 08:20:19 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:59864 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbaDNMUS (ORCPT ); Mon, 14 Apr 2014 08:20:18 -0400 Received: by mail-lb0-f174.google.com with SMTP id u14so5567967lbd.19 for ; Mon, 14 Apr 2014 05:20:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sbFx5AIb3zYX4hPRNKtXPlq2mO3dDGMvYrQzjGV1v6s=; b=UR1erN60brmj0ji4Uy6IUdVa9OcBJSoM2VIAKn7S455174BKfpcYpVymvXi4F1ieoA Pbh3JcEXtK2xs7p1+lZpEWxNrwYH7b0pPR4cbgHFiCRxop6/+YRepeNrqSag3nhQNgCJ f6YiIuj/m1KsNdL8w+ifqDmEmuXCcwN8foyvsF2Yy4cjYu3gS7mFxVNycELF1T25rMQo nnM3r/Huan4cAl3RT9mskHSmGEenXddAo+f1GmgRucKsj6WXc9r2/4d1AOB1tcgQCa2o q9pIUUfgEbtulx6YS/bDijuoYH+SvUkcix71sQJgrUKZ2AE+/RKi40s9t3pa4b5HHtGI S95Q== X-Gm-Message-State: ALoCoQkgRXtdARjmWovK6jpQA/93ItNkcLyL62qP6oCgmk6ignyjZQpQtyYfwLs6V9VFc6Lvzclt X-Received: by 10.152.37.137 with SMTP id y9mr29103023laj.8.1397478016393; Mon, 14 Apr 2014 05:20:16 -0700 (PDT) Received: from localhost.localdomain (a91-152-78-194.elisa-laajakaista.fi. [91.152.78.194]) by mx.google.com with ESMTPSA id mk5sm15778161lac.6.2014.04.14.05.20.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 05:20:15 -0700 (PDT) From: Fathi Boudra To: linux-kbuild Cc: Michal Marek , Ben Hutchings , Maximilian Attems , Fathi Boudra Subject: [PATCH] builddeb: fix missing headers in linux-headers package on arm architecture Date: Mon, 14 Apr 2014 15:19:56 +0300 Message-Id: <1397477996-24575-1-git-send-email-fathi.boudra@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The kernel headers package (linux-headers) doesn't include the arch/arm/mach-*/include header files. It makes the package unusable on ARM architecture and prevent out-of-tree modules build: /usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25: fatal error: mach/memory.h: No such file or directory #include ^ compilation terminated. While this patch explicitely test arm architecture, avr32 and blackfin are affected since they ship mach-* headers. However, they haven't been included in the test because they aren't official architectures supported by Debian. minor tweak: clean up the linux-headers package by using tar exclude option. Signed-off-by: Fathi Boudra --- scripts/package/builddeb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f46e4dd..74ebd54 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -287,14 +287,18 @@ EOF fi -# Build header package +# Build kernel header package (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") +if [ "$ARCH" = "arm" ]; then + (cd $srctree; find arch/arm/mach-*/include -type f >> "$objtree/debian/hdrsrcfiles") +fi (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" -(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) -(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) +excludes="--exclude-vcs --exclude=*.cmd --exclude=*.o --exclude=Documentation" +(cd $srctree; tar $excludes -cf - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) +(cd $objtree; tar $excludes -cf - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"