All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM
@ 2014-11-12 15:38 Clark Laughlin
  2014-11-12 15:43 ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Clark Laughlin @ 2014-11-12 15:38 UTC (permalink / raw)
  To: xen-devel; +Cc: Clark Laughlin

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 <clark.laughlin@linaro.org>

---
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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM
  2014-11-12 15:38 [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM Clark Laughlin
@ 2014-11-12 15:43 ` Ian Campbell
  2014-11-14 10:10   ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-11-12 15:43 UTC (permalink / raw)
  To: Clark Laughlin; +Cc: xen-devel

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 <clark.laughlin@linaro.org>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM
  2014-11-12 15:43 ` Ian Campbell
@ 2014-11-14 10:10   ` Ian Campbell
  2014-11-19 19:45     ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-11-14 10:10 UTC (permalink / raw)
  To: Clark Laughlin, Ian Jackson, Wei Liu, Tim Deegan,
	Konrad Rzeszutek Wilk
  Cc: xen-devel

(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 <clark.laughlin@linaro.org>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

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 <clark.laughlin@linaro.org>
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 <clark.laughlin@linaro.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
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
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM
  2014-11-14 10:10   ` Ian Campbell
@ 2014-11-19 19:45     ` Konrad Rzeszutek Wilk
  2014-11-20 15:58       ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-11-19 19:45 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Wei Liu, Clark Laughlin, Ian Jackson, xen-devel, Tim Deegan

On Fri, Nov 14, 2014 at 10:10:58AM +0000, Ian Campbell wrote:
> (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 <clark.laughlin@linaro.org>
> > 
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> 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.

Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> ------
> 
> >From d861e1bcf5c3530ef322515ec2c55031dd538277 Mon Sep 17 00:00:00 2001
> From: Clark Laughlin <clark.laughlin@linaro.org>
> 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 <clark.laughlin@linaro.org>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> 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
> -- 
> 1.7.10.4
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM
  2014-11-19 19:45     ` Konrad Rzeszutek Wilk
@ 2014-11-20 15:58       ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-11-20 15:58 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Ian Jackson, Tim Deegan, Clark Laughlin, Wei Liu, xen-devel

On Wed, 2014-11-19 at 14:45 -0500, Konrad Rzeszutek Wilk wrote:
> On Fri, Nov 14, 2014 at 10:10:58AM +0000, Ian Campbell wrote:
> > (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 <clark.laughlin@linaro.org>
> > > 
> > > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > 
> > 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.
> 
> Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Ian J acked on IRC, so I've applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-20 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 15:38 [PATCH v2] mkdeb: correctly map package architectures for x86 and ARM Clark Laughlin
2014-11-12 15:43 ` Ian Campbell
2014-11-14 10:10   ` Ian Campbell
2014-11-19 19:45     ` Konrad Rzeszutek Wilk
2014-11-20 15:58       ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.