|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/5] raisin: rename ARCH to RAISIN_ARCH
Rename exported environmental variable ARCH to RAISIN_ARCH not to
conflict with any component Makefile variables.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
README | 2 +-
components/grub | 6 +++---
components/libvirt | 2 +-
components/qemu | 2 +-
components/qemu_traditional | 2 +-
components/seabios | 6 +++---
components/xen | 2 +-
lib/common-functions.sh | 6 +++---
scripts/mkdeb | 8 ++++----
scripts/mkrpm | 2 +-
10 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/README b/README
index ab8d3e7..b7832da 100644
--- a/README
+++ b/README
@@ -85,7 +85,7 @@ RAISIN_MAKE: make command to run
SUDO: sudo command to run
DISTRO: which Linux distribution we are running on, Debian, Fedora, etc
PKGTYPE: which package format is used by the distro, rpm, deb, etc
-ARCH: which architecture we are running on, x86_64, arm32, etc.
+RAISIN_ARCH: which architecture we are running on, x86_64, arm32, etc.
BASEDIR: absolute path of the raisin directory
PREFIX: installation PREFIX
INST_DIR: absolute path of the installation directory
diff --git a/components/grub b/components/grub
index 7c14a62..fa72b99 100644
--- a/components/grub
+++ b/components/grub
@@ -17,13 +17,13 @@ function grub_check_package() {
local DEP_CentOS_x86_64="$DEP_Fedora_x86_64"
- if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]]
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
then
echo grub is only supported on x86_32 and x86_64
return
fi
echo Checking Grub dependencies
- eval check-package \$DEP_"$DISTRO"_"$ARCH"
+ eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
@@ -41,7 +41,7 @@ function grub_build() {
-m ../memdisk.tar -o grub-i386-xen grub-core/*mod
cp grub-i386-xen "$INST_DIR"/$PREFIX/lib/xen/boot
## GRUB64
- if [[ $ARCH = "x86_64" ]]
+ if [[ $RAISIN_ARCH = "x86_64" ]]
then
$RAISIN_MAKE clean
./configure --target=amd64 --with-platform=xen
diff --git a/components/libvirt b/components/libvirt
index 5fb1a41..a554643 100644
--- a/components/libvirt
+++ b/components/libvirt
@@ -23,7 +23,7 @@ function libvirt_check_package() {
local DEP_CentOS_x86_64="$DEP_Fedora_x86_64"
echo Checking Libvirt dependencies
- eval check-package \$DEP_"$DISTRO"_"$ARCH"
+ eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function libvirt_build() {
diff --git a/components/qemu b/components/qemu
index 00aeeb6..72cfec1 100644
--- a/components/qemu
+++ b/components/qemu
@@ -12,7 +12,7 @@ function qemu_check_package() {
local DEP_Fedora_x86_64="$DEP_Fedora_common"
echo Checking QEMU dependencies
- eval check-package \$DEP_"$DISTRO"_"$ARCH"
+ eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function qemu_build() {
diff --git a/components/qemu_traditional b/components/qemu_traditional
index 500cbed..b338007 100644
--- a/components/qemu_traditional
+++ b/components/qemu_traditional
@@ -13,7 +13,7 @@ function qemu_traditional_check_package() {
local DEP_Fedora_x86_64="$DEP_Fedora_common"
echo Checking QEMU dependencies
- eval check-package \$DEP_"$DISTRO"_"$ARCH"
+ eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function qemu_traditional_build() {
diff --git a/components/seabios b/components/seabios
index 960a538..ed2c7d2 100644
--- a/components/seabios
+++ b/components/seabios
@@ -12,18 +12,18 @@ function seabios_check_package() {
local DEP_Fedora_x86_64="$DEP_Fedora_common"
- if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]]
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
then
echo seabios is only supported on x86_32 and x86_64
return
fi
echo Checking SeaBIOS dependencies
- eval check-package \$DEP_"$DISTRO"_"$ARCH"
+ eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function seabios_build() {
- if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]]
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
then
echo seabios is only supported on x86_32 and x86_64
return
diff --git a/components/xen b/components/xen
index b7258b0..b3426f0 100644
--- a/components/xen
+++ b/components/xen
@@ -20,7 +20,7 @@ function xen_check_package() {
local DEP_CentOS_x86_64="$DEP_CentOS_x86_32 glibc-devel.i686"
echo Checking Xen dependencies
- eval check-package \$DEP_"$DISTRO"_"$ARCH"
+ eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function xen_build() {
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index c19046b..186a53b 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -41,7 +41,7 @@ function common_init() {
get_components
_verbose_echo "Distro: $DISTRO"
- _verbose_echo "Arch: $ARCH"
+ _verbose_echo "Arch: $RAISIN_ARCH"
_verbose_echo "Components: $COMPONENTS"
for f in $COMPONENTS
@@ -161,7 +161,7 @@ function get_distro() {
}
function get_arch() {
- export ARCH=`uname -m | sed -e s/i.86/x86_32/ -e s/i86pc/x86_32/ -e \
+ export RAISIN_ARCH=`uname -m | sed -e s/i.86/x86_32/ -e s/i86pc/x86_32/ -e
\
s/amd64/x86_64/ -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \
-e s/aarch64/arm64/`
}
@@ -296,7 +296,7 @@ function install_package() {
$SUDO dpkg -i "$1".deb
elif [[ $DISTRO = "Fedora" ]]
then
- $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " "
-f 1`-0.$ARCH.rpm
+ $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " "
-f 1`-0.$RAISIN_ARCH.rpm
else
echo "Don't know how to install packages on $DISTRO"
fi
diff --git a/scripts/mkdeb b/scripts/mkdeb
index 0225736..dbd92bd 100755
--- a/scripts/mkdeb
+++ b/scripts/mkdeb
@@ -3,7 +3,7 @@
# mkdeb: package $INST_DIR output in a .deb
#
# Takes 1 argument: the package name
-# It relies on ARCH and INST_DIR being set correctly
+# It relies on RAISIN_ARCH and INST_DIR being set correctly
set -e
@@ -18,12 +18,12 @@ name=$1
cd "$BASEDIR"
# map the architecture, if necessary
-case "$ARCH" in
+case "$RAISIN_ARCH" in
x86_32|x86_32p) arch=i386 ;;
x86_64) arch=amd64 ;;
arm32) arch=armhf ;;
- arm64) arch=$ARCH;;
- *) echo "Unknown ARCH $ARCH" >&2
+ arm64) arch=$RAISIN_ARCH;;
+ *) echo "Unknown ARCH $RAISIN_ARCH" >&2
exit 1
;;
esac
diff --git a/scripts/mkrpm b/scripts/mkrpm
index 8de4508..7965c0c 100755
--- a/scripts/mkrpm
+++ b/scripts/mkrpm
@@ -3,7 +3,7 @@
# mkrpm: package INST_DIR in an .rpm
#
# Takes 1 argument: the package name
-# It relies on ARCH and INST_DIR being set correctly
+# It relies on INST_DIR being set correctly
set -e
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |