From patchwork Wed Nov 12 15:38:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clark Laughlin X-Patchwork-Id: 40682 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C844A24493 for ; Wed, 12 Nov 2014 15:41:12 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id e51sf8277243eek.2 for ; Wed, 12 Nov 2014 07:41:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=tmKB8GI8Iknc7VLRBqdr1231M6yzQwyaPuJcAUwVnOo=; b=iTBtmh99XWhmER/B8ltbY2w0UonGpa6wuj1J7e7ftEOFsHyxuhOrQ6uDLd9Mjae9vP D1S+kRHQXUX0SkkPxkimWU1N4i10I/110E5Y6K+FVf4UkR3qqyTz6nMvHJh3PbtdYFf+ yej+6N2aw4gDcbyLW2TMqkSYv7/vYMMViindvXA7THS0Bzoh5udtZstMnVMhQQpPPoqN b/7e8AWo3M2V44PmIavApYexH9bez5chFu/Y7U6Kh+kRIukgM9s/mOfsPEWZ+HJ3w6k7 pZSNtqqzuyzMVy15dfHkX+FcZymGNVv4e+KnMlBuwuQ41Lqk0IwoRainAw3MCPxKmZQO Ww4Q== X-Gm-Message-State: ALoCoQmjk+YTHCYUUxYFTIe5boFkkO2CElj3pa27wxyqnrZE6A8D28U11iCaUpgZPxhA+1sn9Wl4 X-Received: by 10.181.27.135 with SMTP id jg7mr6769029wid.5.1415806872003; Wed, 12 Nov 2014 07:41:12 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.228.140 with SMTP id si12ls688832lac.25.gmail; Wed, 12 Nov 2014 07:41:11 -0800 (PST) X-Received: by 10.112.180.198 with SMTP id dq6mr42178483lbc.56.1415806871273; Wed, 12 Nov 2014 07:41:11 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id kz1si35347130lbc.63.2014.11.12.07.41.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Nov 2014 07:41:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id 10so9561016lbg.14 for ; Wed, 12 Nov 2014 07:41:10 -0800 (PST) X-Received: by 10.112.12.35 with SMTP id v3mr3191113lbb.80.1415806870943; Wed, 12 Nov 2014 07:41:10 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp445070lbc; Wed, 12 Nov 2014 07:41:10 -0800 (PST) X-Received: by 10.50.137.1 with SMTP id qe1mr41299984igb.18.1415806869650; Wed, 12 Nov 2014 07:41:09 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id iv13si31743989icc.88.2014.11.12.07.41.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 12 Nov 2014 07:41:09 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XoZyd-0000fN-Bq; Wed, 12 Nov 2014 15:36:59 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XoZyc-0000f1-77 for xen-devel@lists.xenproject.org; Wed, 12 Nov 2014 15:36:58 +0000 Received: from [193.109.254.147] by server-5.bemta-14.messagelabs.com id FF/68-08051-89E73645; Wed, 12 Nov 2014 15:36:56 +0000 X-Env-Sender: clark.laughlin@linaro.org X-Msg-Ref: server-3.tower-27.messagelabs.com!1415806615!12001463!1 X-Originating-IP: [209.85.218.46] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19407 invoked from network); 12 Nov 2014 15:36:56 -0000 Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 12 Nov 2014 15:36:56 -0000 Received: by mail-oi0-f46.google.com with SMTP id g201so8730816oib.19 for ; Wed, 12 Nov 2014 07:36:54 -0800 (PST) X-Received: by 10.202.71.66 with SMTP id u63mr36703104oia.54.1415806614894; Wed, 12 Nov 2014 07:36:54 -0800 (PST) Received: from smith.hp-linaro.org (173-11-172-149-houston.txt.hfc.comcastbusiness.net. [173.11.172.149]) by mx.google.com with ESMTPSA id ps7sm4539598obb.5.2014.11.12.07.36.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Nov 2014 07:36:53 -0800 (PST) From: Clark Laughlin To: xen-devel@lists.xenproject.org Date: Wed, 12 Nov 2014 09:38:48 -0600 Message-Id: <1415806728-28484-1-git-send-email-clark.laughlin@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: Clark Laughlin Subject: [Xen-devel] [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: clark.laughlin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: mkdeb previously set the package architecture to be 'amd64' for anything other than XEN_TARGET_ARCH=x86_32. This patch attempts to correctly map the architecture from GNU names to debian names for x86 and ARM architectures, or otherwise, defaults it to the value in XEN_TARGET_ARCH. Signed-off-by: Clark Laughlin Acked-by: Ian Campbell --- Changed since v1: corrected commit message / subject --- tools/misc/mkdeb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/misc/mkdeb b/tools/misc/mkdeb index 3bbf881..4d14d9e 100644 --- a/tools/misc/mkdeb +++ b/tools/misc/mkdeb @@ -13,11 +13,16 @@ fi cd $1 version=$2 -if test "$XEN_TARGET_ARCH" = "x86_32"; then - arch=i386 -else - arch=amd64 -fi + +# map the architecture, if necessary +arch=$XEN_TARGET_ARCH +case "$XEN_TARGET_ARCH" in + x86_32) arch=i386 ;; + i686) arch=i386 ;; + x86_64) arch=amd64 ;; + arm32) arch=armhf ;; + aarch64) arch=arm64 ;; +esac # Prepare the directory to package cd dist