From patchwork Fri Nov 14 10:10:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 40806 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4EDFC240ED for ; Fri, 14 Nov 2014 10:12:58 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id c41sf10506011eek.8 for ; Fri, 14 Nov 2014 02:12:57 -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:message-id:from:to:date:in-reply-to :references:organization:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=sPKaIL7Mh+PwXGx3nFqg3NQ/qTbgW4e1wtzK8008N4E=; b=KFqa0y/A1EfNWdKwP3lPB3WscjY/Vg+u7K21ouFEAJfLvRAbKEZRtPmgk1/UxH5TFu VOWJOeK2hsYOFPs5B0KVKz5EBnJTCN6Sr/gfm/SoPuL4+nMII3FmRpsQLd7s1Sqfe1z7 6OBfNZFBM+OxvY+6MB4t39IL2V7Kxtw+y0fnwLjos6aDioELaNaYdgy9OUu6sTpLFcx+ d37S7hjQkwgWAFNADR2N7uK/S9eCmejjDbI8W81Z3gWB+2rMEWeCQ0+O64XTX0LLLoU6 VHc/+zOvxphL46LJB0XRfWCCiPR4NqYwqtqJp1ab6Hc+S3VYne3i0FsZcVpuUwPmC0UJ 8LoA== X-Gm-Message-State: ALoCoQmukNOF1A2j14GN2OUUEiP/gd9gSVW0KMhH+GJKMS/RjQUoJijy19zNLahHkuDvFhxv/auB X-Received: by 10.152.88.98 with SMTP id bf2mr10444622lab.1.1415959977482; Fri, 14 Nov 2014 02:12:57 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.227 with SMTP id ap3ls901468lac.60.gmail; Fri, 14 Nov 2014 02:12:57 -0800 (PST) X-Received: by 10.112.137.39 with SMTP id qf7mr7306551lbb.47.1415959977202; Fri, 14 Nov 2014 02:12:57 -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 uf7si25800831lac.99.2014.11.14.02.12.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 02:12:57 -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 10so12546755lbg.14 for ; Fri, 14 Nov 2014 02:12:57 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr7453568lbc.34.1415959977082; Fri, 14 Nov 2014 02:12:57 -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 ew9csp740005lbc; Fri, 14 Nov 2014 02:12:56 -0800 (PST) X-Received: by 10.140.27.194 with SMTP id 60mr9840856qgx.57.1415959975642; Fri, 14 Nov 2014 02:12:55 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id d2si50352003qgd.80.2014.11.14.02.12.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Nov 2014 02:12:55 -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 1XpDqY-00043Y-C4; Fri, 14 Nov 2014 10:11:18 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XpDqX-00043P-AA for xen-devel@lists.xenproject.org; Fri, 14 Nov 2014 10:11:17 +0000 Received: from [193.109.254.147] by server-11.bemta-14.messagelabs.com id 3E/36-02696-445D5645; Fri, 14 Nov 2014 10:11:16 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1415959874!12537320!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20943 invoked from network); 14 Nov 2014 10:11:15 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 14 Nov 2014 10:11:15 -0000 X-IronPort-AV: E=Sophos;i="5.07,384,1413244800"; d="scan'208";a="192793205" Message-ID: <1415959858.21321.23.camel@citrix.com> From: Ian Campbell To: Clark Laughlin , Ian Jackson , Wei Liu , Tim Deegan , Konrad Rzeszutek Wilk Date: Fri, 14 Nov 2014 10:10:58 +0000 In-Reply-To: <1415807026.1155.21.camel@citrix.com> References: <1415806728-28484-1-git-send-email-clark.laughlin@linaro.org> <1415807026.1155.21.camel@citrix.com> Organization: Citrix Systems, Inc. X-Mailer: Evolution 3.12.7-1 MIME-Version: 1.0 X-DLP: MIA2 Cc: xen-devel@lists.xenproject.org Subject: Re: [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: , 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: ian.campbell@citrix.com 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: (CCing some more maintainers and the release manager) On Wed, 2014-11-12 at 15:43 +0000, Ian Campbell wrote: > On Wed, 2014-11-12 at 09:38 -0600, Clark Laughlin wrote: > > 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 Actually thinking about it some more I'd be happier arguing for a freeze exception for something like the below which only handles the actual valid values of XEN_TARGET_ARCH and not the GNU names (which cannot happen) and prints an error for unknown architectures (so new ports aren't bitten in the future, etc). Konrad, wrt the freeze I think this is low risk for breaking x86 platforms and makes things work for arm, so is worth it. ------ >From d861e1bcf5c3530ef322515ec2c55031dd538277 Mon Sep 17 00:00:00 2001 From: Clark Laughlin Date: Wed, 12 Nov 2014 09:38:48 -0600 Subject: [PATCH] mkdeb: correctly map package architectures for x86 and ARM 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 XEN_TARGET_ARCH to the Debian architecture names for x86 and ARM architectures. Signed-off-by: Clark Laughlin Signed-off-by: Ian Campbell --- v3 (ijc): Handle only valid values for $XEN_TARGET_ARCH, print an error if the arch is unknown. --- tools/misc/mkdeb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/misc/mkdeb b/tools/misc/mkdeb index 3bbf881..67b91cc 100644 --- a/tools/misc/mkdeb +++ b/tools/misc/mkdeb @@ -13,11 +13,17 @@ fi cd $1 version=$2 -if test "$XEN_TARGET_ARCH" = "x86_32"; then - arch=i386 -else - arch=amd64 -fi + +# map the architecture, if necessary +case "$XEN_TARGET_ARCH" in + x86_32|x86_32p) arch=i386 ;; + x86_64) arch=amd64 ;; + arm32) arch=armhf ;; + arm64) arch=$XEN_TARGET_ARCH;; + *) echo "Unknown XEN_TARGET_ARCH $XEN_TARGET_ARCH" >&2 + exit 1 + ;; +esac # Prepare the directory to package cd dist