From patchwork Tue Apr 15 12:03:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 3992221 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3A7F6BFF02 for ; Tue, 15 Apr 2014 12:04:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70ADA2017B for ; Tue, 15 Apr 2014 12:04:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4CCF20179 for ; Tue, 15 Apr 2014 12:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbaDOMEU (ORCPT ); Tue, 15 Apr 2014 08:04:20 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:59392 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752800AbaDOMDt (ORCPT ); Tue, 15 Apr 2014 08:03:49 -0400 Received: by mail-lb0-f175.google.com with SMTP id w7so6697579lbi.20 for ; Tue, 15 Apr 2014 05:03:48 -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=cffSGfApyJz1gAAoaZ7WSPFO1qBS0EDw9W2/haJ6S7I=; b=PDTnMEIIccL7LsUHhr0EU71QLvtAiQ7FBQD4EnouVMi9Pg4o8KKzvyIxKWcaGPAqVl 6KlRMW5XHPcMPfXcvlRqUa7XpbnP/Ea+ejYYg52BozyxlB59UW7m/irvPryUZ+ayHXEk z4HSPfcmLdYSdbuX4hDh9m2oIpkMure850zZ4/kr1IvMWohfgOkxMeKn+tBs4CDMK1eQ x2P7BN5JsFW8MaxCWJ3WyeLWKxLGX5hHULK0kR0tuCfIcfGKQ5J38ZtCogCbRREVz929 SBIc8QLBN+OxYFareeZ5LIB2w+nUsYWeGTJwZAMqgOIfVvj2pvzCs46aByx2mKicx3pK VjMw== X-Gm-Message-State: ALoCoQnP3WJdpOF63I5acPtPZJhOLA83HK7T9dHQssvLDn9r3j8BjLPgPuSr+N03aFwcN5si1Yjy X-Received: by 10.112.11.162 with SMTP id r2mr36981lbb.89.1397563428414; Tue, 15 Apr 2014 05:03:48 -0700 (PDT) Received: from localhost.localdomain (a91-152-78-194.elisa-laajakaista.fi. [91.152.78.194]) by mx.google.com with ESMTPSA id f9sm18840477laa.8.2014.04.15.05.03.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 05:03:47 -0700 (PDT) From: Fathi Boudra To: linux-kbuild Cc: Michal Marek , Ben Hutchings , Maximilian Attems , Fathi Boudra Subject: [PATCH] builddeb: clean up the linux-headers package by using tar exclude option Date: Tue, 15 Apr 2014 15:03:44 +0300 Message-Id: <1397563424-10134-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.6 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 Use tar --exclude option to clean up the kernel headers package (linux-headers) from unecessary files. Signed-off-by: Fathi Boudra --- scripts/package/builddeb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f46e4dd..f5ac45d 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -293,8 +293,9 @@ 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"