raisin: Fix non-verbose case
Subsystems (2)
PATCH 1/8 raisin: Fix non-verbose case
Because we use "set -e", we can't use the "a && b" construct, as it will fail and stop the script.
--- lib/common-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/common-functions.sh +2 -2
@@ -232,9 +232,9 @@ function for_each_component () { fi if eval [[ ! -z \$"$capital"_REVISION ]] then - [[ $VERBOSE -eq 1 ]] && echo calling "$component"_"$1" + [[ $VERBOSE -eq 0 ]] || echo calling "$component"_"$1" "$component"_"$1" - [[ $VERBOSE -eq 1 ]] && echo "$component"_"$1" done + [[ $VERBOSE -eq 0 ]] || echo "$component"_"$1" done fi done }
Signature · 1 line
1.9.1
PATCH 2/8 Include actual config in package, not defconfig
We want to include the actual config used to build the packages.
---
CC: Stefano Stabellini <[email protected]>
--- raise | 1 - scripts/mkdeb | 2 +- scripts/mkrpm | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
raise +0 -1
@@ -74,4 +74,3 @@ case "$1" in esac $COMMAND -
scripts/mkdeb +1 -1
@@ -36,7 +36,7 @@ cp -r data deb/opt/raisin cp -r components deb/opt/raisin cp -r scripts deb/opt/raisin cp -r lib deb/opt/raisin -cp defconfig raise deb/opt/raisin +cp config raise deb/opt/raisin # Debian doesn't use /usr/lib64 for 64-bit libraries
scripts/mkrpm +1 -1
@@ -48,7 +48,7 @@ cp -r "$BASEDIR"/data \$RPM_BUILD_ROOT/opt/raisin cp -r "$BASEDIR"/components \$RPM_BUILD_ROOT/opt/raisin cp -r "$BASEDIR"/scripts \$RPM_BUILD_ROOT/opt/raisin cp -r "$BASEDIR"/lib \$RPM_BUILD_ROOT/opt/raisin -cp "$BASEDIR"/defconfig \$RPM_BUILD_ROOT/opt/raisin +cp "$BASEDIR"/config \$RPM_BUILD_ROOT/opt/raisin cp "$BASEDIR"/raise \$RPM_BUILD_ROOT/opt/raisin %clean
Signature · 1 line
1.9.1
Re: [PATCH 2/8] Include actual config in package, not defconfig
Quoted 3 lines · George Dunlap
We want to include the actual config used to build the packages.
Signed-off-by George Dunlap <[email protected]>
Acked and committed
Quoted 45 lines
CC Stefano Stabellini <[email protected]>--- raise | 1 - scripts/mkdeb | 2 +- scripts/mkrpm | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)raise +0
-1@@ -74,4 +74,3 @@ case "$1" in esac $COMMAND -scripts/mkdeb +1
-1@@ -36,7 +36,7 @@ cp -r data deb/opt/raisin cp -r components deb/opt/raisin cp -r scripts deb/opt/raisin cp -r lib deb/opt/raisin -cp defconfig raise deb/opt/raisin +cp config raise deb/opt/raisin # Debian doesn't use /usr/lib64 for 64-bit librariesscripts/mkrpm +1
-1@@ -48,7 +48,7 @@ cp -r "$BASEDIR"/data \$RPM_BUILD_ROOT/opt/raisin cp -r "$BASEDIR"/components \$RPM_BUILD_ROOT/opt/raisin cp -r "$BASEDIR"/scripts \$RPM_BUILD_ROOT/opt/raisin cp -r "$BASEDIR"/lib \$RPM_BUILD_ROOT/opt/raisin -cp "$BASEDIR"/defconfig \$RPM_BUILD_ROOT/opt/raisin +cp "$BASEDIR"/config \$RPM_BUILD_ROOT/opt/raisin cp "$BASEDIR"/raise \$RPM_BUILD_ROOT/opt/raisin %cleanSignature · 1 line
1.9.1
PATCH 3/8 raisin: Use fakeroot for mkdeb so we can build the package as non-root
In reply to George Dunlap---
CC: Stefano Stabellini <[email protected]>
--- lib/common-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/common-functions.sh +1 -1
@@ -242,7 +242,7 @@ function for_each_component () { function build_package() { if [[ $DISTRO = "Debian" ]] then - ./scripts/mkdeb "$1" + fakeroot bash ./scripts/mkdeb "$1" elif [[ $DISTRO = "Fedora" ]] then ./scripts/mkrpm "$1"
Signature · 1 line
1.9.1
Re: [PATCH 3/8] raisin: Use fakeroot for mkdeb so we can build the package as non-root
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>
AIUI raisin does build dependency handling/tracking. If so then fakeroot ought to be added to it I think?
Quoted 2 lines
---
CC: Stefano Stabellini <[email protected]>
Does CC below a CC work? Interesting.
Quoted 17 lines
--- lib/common-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/common-functions.sh +1
-1@@ -242,7 +242,7 @@ function for_each_component () { function build_package() { if [[ $DISTRO = "Debian" ]] then - ./scripts/mkdeb "$1" + fakeroot bash ./scripts/mkdeb "$1" elif [[ $DISTRO = "Fedora" ]] then ./scripts/mkrpm "$1"
Re: [PATCH 3/8] raisin: Use fakeroot for mkdeb so we can build the package as non-root
Quoted 5 lines · Ian Campbell
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>AIUI raisin does build dependency handling/tracking. If so then fakeroot ought to be added to it I think?
Good point! Please add fakeroot as Debian specific dependency for every component, like rpm-build for Fedora.
Quoted 24 lines
Quoted 2 lines
---
CC: Stefano Stabellini <[email protected]>Does CC below a CC work? Interesting.
Quoted 17 lines
--- lib/common-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/common-functions.sh +1
-1@@ -242,7 +242,7 @@ function for_each_component () { function build_package() { if [[ $DISTRO = "Debian" ]] then - ./scripts/mkdeb "$1" + fakeroot bash ./scripts/mkdeb "$1" elif [[ $DISTRO = "Fedora" ]] then ./scripts/mkrpm "$1"
Re: [PATCH 3/8] raisin: Use fakeroot for mkdeb so we can build the package as non-root
Quoted 9 lines · Stefano Stabellini
Quoted 5 lines · Ian Campbell
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>AIUI raisin does build dependency handling/tracking. If so then fakeroot ought to be added to it I think?
Good point! Please add fakeroot as Debian specific dependency for every component, like rpm-build for Fedora.
I made the change and commit it.
Quoted 26 lines
Quoted 25 lines
Quoted 3 lines
---
CC: Stefano Stabellini <[email protected]>Does CC below a CC work? Interesting.
Quoted 17 lines
--- lib/common-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/common-functions.sh +1
-1@@ -242,7 +242,7 @@ function for_each_component () { function build_package() { if [[ $DISTRO = "Debian" ]] then - ./scripts/mkdeb "$1" + fakeroot bash ./scripts/mkdeb "$1" elif [[ $DISTRO = "Fedora" ]] then ./scripts/mkrpm "$1"
Re: [PATCH 3/8] raisin: Use fakeroot for mkdeb so we can build the package as non-root
In reply to Ian CampbellQuoted 5 lines · Ian Campbell
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>AIUI raisin does build dependency handling/tracking. If so then fakeroot ought to be added to it I think?
The Ubuntu docker image seems to include it (or it's already implied by other dependencies); but yes, I'll add that.
Quoted 4 lines
Quoted 2 lines
---
CC: Stefano Stabellini <[email protected]>Does CC below a CC work? Interesting.
CC below a --- line you mean?
-George
Re: [PATCH 3/8] raisin: Use fakeroot for mkdeb so we can build the package as non-root
Quoted 9 lines · George Dunlap
Quoted 5 lines · Ian Campbell
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>AIUI raisin does build dependency handling/tracking. If so then fakeroot ought to be added to it I think?
The Ubuntu docker image seems to include it (or it's already implied by other dependencies); but yes, I'll add that.
I can't see which dep it would be, but regardless: thanks.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
---
CC: Stefano Stabellini <[email protected]>Does CC below a CC work? Interesting.
CC below a --- line you mean?
Yes. Clearly my fingers were faster than my brain last week.
Ian.
PATCH 4/8 raisin: Use PKGTYPE rather than DISTRO to determine how to build a package
In reply to George Dunlap---
CC: Stefano Stabellini <[email protected]>
--- lib/common-functions.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
lib/common-functions.sh +9 -9
@@ -239,16 +239,16 @@ function for_each_component () { done } +function _build_package_deb() { + fakeroot bash ./scripts/mkdeb "$1" +} + +function _build_package_rpm() { + ./scripts/mkrpm "$1" +} + function build_package() { - if [[ $DISTRO = "Debian" ]] - then - fakeroot bash ./scripts/mkdeb "$1" - elif [[ $DISTRO = "Fedora" ]] - then - ./scripts/mkrpm "$1" - else - echo "Don't know how to create packages for $DISTRO" - fi + _build_package_${PKGTYPE} "$1" } function install_package() {
Signature · 1 line
1.9.1
Re: [PATCH 4/8] raisin: Use PKGTYPE rather than DISTRO to determine how to build a package
Quoted 24 lines · George Dunlap
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- lib/common-functions.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)lib/common-functions.sh +8
-0@@ -239,16 +239,16 @@ function for_each_component () { done } +function _build_package_deb() { + fakeroot bash ./scripts/mkdeb "$1" +} + +function _build_package_rpm() { + ./scripts/mkrpm "$1" +} + function build_package() {
lib/common-functions.sh function for_each_component () { · line 251
Quoted 10 lines
lib/common-functions.sh +1
-9- if [[ $DISTRO = "Debian" ]] - then - fakeroot bash ./scripts/mkdeb "$1" - elif [[ $DISTRO = "Fedora" ]] - then - ./scripts/mkrpm "$1" - else - echo "Don't know how to create packages for $DISTRO" - fi + _build_package_${PKGTYPE} "$1"
Just use "$PKGTYPE" instead of ${}
Also please document PKGTYPE among the exported global variables in the README.
Quoted 6 lines
lib/common-functions.sh +0
-0} function install_package() {Signature · 1 line
1.9.1
Re: [PATCH 4/8] raisin: Use PKGTYPE rather than DISTRO to determine how to build a package
Quoted 31 lines · Stefano Stabellini
Quoted 30 lines · George Dunlap
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- lib/common-functions.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)lib/common-functions.sh +8
-6@@ -239,16 +239,16 @@ function for_each_component () { done } +function _build_package_deb() { + fakeroot bash ./scripts/mkdeb "$1" +} + +function _build_package_rpm() { + ./scripts/mkrpm "$1" +} + function build_package() { - if [[ $DISTRO = "Debian" ]] - then - fakeroot bash ./scripts/mkdeb "$1" - elif [[ $DISTRO = "Fedora" ]] - then - ./scripts/mkrpm "$1"
Quoted 8 lines
lib/common-functions.sh function for_each_component () { · line 251
Quoted 4 lines
lib/common-functions.sh +1
-3- else - echo "Don't know how to create packages for $DISTRO" - fi + _build_package_${PKGTYPE} "$1"Just use "$PKGTYPE" instead of ${}
Also please document PKGTYPE among the exported global variables in the README.
I made the changes and committed.
Quoted 8 lines
Quoted 7 lines
lib/common-functions.sh +0
-0} function install_package() {Signature · 1 line
1.9.1
PATCH 5/8 raisin: Fix CentOS build
In reply to George DunlapAdd package dependencies for CentOS. Also use PKGTYPE rather than DISTRO to determine if we need rpm-build.
I've tested this for xen but not for libvirt or grub.
---
CC: Stefano Stabellini <[email protected]>
--- components/grub | 5 +++++ components/libvirt | 7 +++++++ components/xen | 10 ++++++++-- lib/commands.sh | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-)
components/grub +5 -0
@@ -12,6 +12,11 @@ function grub_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686" + local DEP_CentOS_common="make gcc tar automake autoconf sysconftool bison flex \ + glibc-devel" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common glibc-devel.i686" + if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]] then
components/libvirt +7 -0
@@ -18,6 +18,13 @@ function libvirt_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common" + local DEP_CentOS_common="patch make gcc libtool autoconf gettext-devel \ + python-devel libxslt yajl-devel libxml2-devel \ + device-mapper-devel libpciaccess-devel \ + libuuid-devel perl-XML-XPath" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common" + echo Checking Libvirt dependencies eval check-package \$DEP_"$DISTRO"_"$ARCH" }
components/xen +8 -2
@@ -11,10 +11,16 @@ function xen_check_package() { local DEP_Fedora_common="make gcc python-devel gettext libuuid-devel \ ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel \ - patch pixman-devel glibc-devel bridge-utils grub2 wget" - local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 acpica-tools texinfo" + patch pixman-devel glibc-devel bridge-utils grub2 wget tar bzip2" + local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 texinfo acpica-devel" local DEP_Fedora_x86_64="$DEP_Fedora_x86_32 glibc-devel.i686" + local DEP_CentOS_common="make gcc python-devel gettext libuuid-devel \ + ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel \ + patch pixman-devel glibc-devel bridge-utils wget tar bzip2" + local DEP_CentOS_x86_32="$DEP_CentOS_common dev86 texinfo iasl" + local DEP_CentOS_x86_64="$DEP_CentOS_x86_32 glibc-devel.i686" + echo Checking Xen dependencies eval check-package \$DEP_"$DISTRO"_"$ARCH" }
lib/commands.sh +1 -1
@@ -5,7 +5,7 @@ function check-builddep() { check-package git - if [[ $DISTRO = "Fedora" ]] + if [[ $PKGTYPE = "rpm" ]] then check-package rpm-build fi
Signature · 1 line
1.9.1
Re: [PATCH 5/8] raisin: Fix CentOS build
components/xen function xen_check_package() { · line 15
Quoted 12 lines · George Dunlap
components/xen +2
-2@@ -11,10 +11,16 @@ function xen_check_package() { local DEP_Fedora_common="make gcc python-devel gettext libuuid-devel \ ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel \ - patch pixman-devel glibc-devel bridge-utils grub2 wget" - local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 acpica-tools texinfo" + patch pixman-devel glibc-devel bridge-utils grub2 wget tar bzip2" + local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 texinfo acpica-devel"
Sorry -- that last one should be "acpica-tools", not acpica-devel. I thought I'd tested it... :-/
-George
Re: [PATCH 5/8] raisin: Fix CentOS build
In reply to George DunlapQuoted 20 lines · George Dunlap
Add package dependencies for CentOS. Also use PKGTYPE rather than DISTRO to determine if we need rpm-build.
I've tested this for xen but not for libvirt or grub.
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- components/grub | 5 +++++ components/libvirt | 7 +++++++ components/xen | 10 ++++++++-- lib/commands.sh | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-)components/grub +0
-0
components/grub function grub_check_package() { · line 18
Quoted 7 lines
components/grub +4
-0@@ -12,6 +12,11 @@ function grub_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686" + local DEP_CentOS_common="make gcc tar automake autoconf sysconftool bison flex \ + glibc-devel" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common glibc-devel.i686"
Given that they are the same as Fedora, I think it is OK to:
local DEP_CentOS_common="$DEP_Fedora_common"
Quoted 8 lines
components/grub +0
-0if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]] thencomponents/libvirt +0
-0
components/libvirt function libvirt_check_package() { · line 26
Quoted 9 lines
components/libvirt +6
-0@@ -18,6 +18,13 @@ function libvirt_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common" + local DEP_CentOS_common="patch make gcc libtool autoconf gettext-devel \ + python-devel libxslt yajl-devel libxml2-devel \ + device-mapper-devel libpciaccess-devel \ + libuuid-devel perl-XML-XPath" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common"
Same here, also please test the libvirt build: the list of dependencies is pretty big, I worry that one of them might actually differ from Fedora
Quoted 16 lines
components/libvirt +0
-0echo Checking Libvirt dependencies eval check-package \$DEP_"$DISTRO"_"$ARCH" }components/xen +2
-2@@ -11,10 +11,16 @@ function xen_check_package() { local DEP_Fedora_common="make gcc python-devel gettext libuuid-devel \ ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel \ - patch pixman-devel glibc-devel bridge-utils grub2 wget" - local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 acpica-tools texinfo" + patch pixman-devel glibc-devel bridge-utils grub2 wget tar bzip2" + local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 texinfo acpica-devel" local DEP_Fedora_x86_64="$DEP_Fedora_x86_32 glibc-devel.i686"
components/xen function xen_check_package() { · line 26
Quoted 10 lines
components/xen +6
-0+ local DEP_CentOS_common="make gcc python-devel gettext libuuid-devel \ + ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel \ + patch pixman-devel glibc-devel bridge-utils wget tar bzip2" + local DEP_CentOS_x86_32="$DEP_CentOS_common dev86 texinfo iasl" + local DEP_CentOS_x86_64="$DEP_CentOS_x86_32 glibc-devel.i686" + echo Checking Xen dependencies eval check-package \$DEP_"$DISTRO"_"$ARCH" }
I think is fair to DEP_CentOS_common="$DEP_Fedora_common" here too (once the acpica-devel/tools thing is fixed)
Quoted 13 lines
lib/commands.sh +1
-1@@ -5,7 +5,7 @@ function check-builddep() { check-package git - if [[ $DISTRO = "Fedora" ]] + if [[ $PKGTYPE = "rpm" ]] then check-package rpm-build fi
Re: [PATCH 5/8] raisin: Fix CentOS build
Quoted 24 lines · Stefano Stabellini
Quoted 23 lines · George Dunlap
Add package dependencies for CentOS. Also use PKGTYPE rather than DISTRO to determine if we need rpm-build.
I've tested this for xen but not for libvirt or grub.
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- components/grub | 5 +++++ components/libvirt | 7 +++++++ components/xen | 10 ++++++++-- lib/commands.sh | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-)components/grub +0
-0@@ -12,6 +12,11 @@ function grub_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686"
Quoted 8 lines
components/grub function grub_check_package() { · line 18
Quoted 4 lines
components/grub +4
-0+ local DEP_CentOS_common="make gcc tar automake autoconf sysconftool bison flex \ + glibc-devel" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common glibc-devel.i686"Given that they are the same as Fedora, I think it is OK to:
local DEP_CentOS_common="$DEP_Fedora_common"
In a previous version of the patch I had "DEP_RedHat_{common,x86_32,x86_64}" (to mean things that were common between all RH decendants, like Fedora or CentOS); but I couldn't make the include stuff work properly. Maybe just have a DEP_RedHat_common, and allow the x86-specific ones to include it?
Quoted 11 lines
Quoted 11 lines
components/grub +0
-0if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]] thencomponents/libvirt +0
-0@@ -18,6 +18,13 @@ function libvirt_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common"
Quoted 9 lines
components/libvirt function libvirt_check_package() { · line 26
Quoted 6 lines
components/libvirt +6
-0+ local DEP_CentOS_common="patch make gcc libtool autoconf gettext-devel \ + python-devel libxslt yajl-devel libxml2-devel \ + device-mapper-devel libpciaccess-devel \ + libuuid-devel perl-XML-XPath" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common"Same here, also please test the libvirt build: the list of dependencies is pretty big, I worry that one of them might actually differ from Fedora
If there were something missing, it wouldn't be a regression (since libvirt doesn't apply without this patch either). Testing libvirt is on my to-do list, but if I don't get to it, would you mind checking it in as-is (once the series is in better shape)? I'll definitely get libvirt working before the release.
-George
Re: [PATCH 5/8] raisin: Fix CentOS build
Quoted 32 lines · George Dunlap
Quoted 31 lines · Stefano Stabellini
Quoted 20 lines · George Dunlap
Add package dependencies for CentOS. Also use PKGTYPE rather than DISTRO to determine if we need rpm-build.
I've tested this for xen but not for libvirt or grub.
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- components/grub | 5 +++++ components/libvirt | 7 +++++++ components/xen | 10 ++++++++-- lib/commands.sh | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-)components/grub +0
-0components/grub function grub_check_package() { · line 18
Quoted 7 lines
components/grub +4
-0@@ -12,6 +12,11 @@ function grub_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686" + local DEP_CentOS_common="make gcc tar automake autoconf sysconftool bison flex \ + glibc-devel" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common glibc-devel.i686"Given that they are the same as Fedora, I think it is OK to:
Quoted 7 lines
Quoted 1 line
local DEP_CentOS_common="$DEP_Fedora_common"
In a previous version of the patch I had "DEP_RedHat_{common,x86_32,x86_64}" (to mean things that were common between all RH decendants, like Fedora or CentOS); but I couldn't make the include stuff work properly. Maybe just have a
DEP_RedHat_common, and allow the x86-specific ones to include it?
But from the look of your patch the list of dependencies at the moment is exactly the same between Fedora and CentOS, so I would avoid DEP_RedHat_{common,x86_32,x86_64}, I would just local DEP_CentOS_common="$DEP_Fedora_common".
Quoted 21 lines
Quoted 11 lines
Quoted 11 lines
components/grub +0
-0if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]] thencomponents/libvirt +0
-0@@ -18,6 +18,13 @@ function libvirt_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common"Quoted 9 lines
components/libvirt function libvirt_check_package() { · line 26
Quoted 6 lines
components/libvirt +6
-0+ local DEP_CentOS_common="patch make gcc libtool autoconf gettext-devel \ + python-devel libxslt yajl-devel libxml2-devel \ + device-mapper-devel libpciaccess-devel \ + libuuid-devel perl-XML-XPath" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common"Same here, also please test the libvirt build: the list of dependencies is pretty big, I worry that one of them might actually differ from Fedora
Quoted 5 lines
If there were something missing, it wouldn't be a regression (since libvirt doesn't apply without this patch either). Testing libvirt is on my to-do list, but if I don't get to it, would you mind checking it in as-is (once the series is in better shape)? I'll definitely get libvirt working before the release.
Having the code in will give the impression that it works already, so I am not very happy about this, but OK.
Re: [PATCH 5/8] raisin: Fix CentOS build
Quoted 68 lines · Stefano Stabellini
Quoted 32 lines · George Dunlap
Quoted 31 lines · Stefano Stabellini
Quoted 20 lines · George Dunlap
Add package dependencies for CentOS. Also use PKGTYPE rather than DISTRO to determine if we need rpm-build.
I've tested this for xen but not for libvirt or grub.
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- components/grub | 5 +++++ components/libvirt | 7 +++++++ components/xen | 10 ++++++++-- lib/commands.sh | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-)components/grub +0
-0components/grub function grub_check_package() { · line 18
Quoted 7 lines
components/grub +4
-0@@ -12,6 +12,11 @@ function grub_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686" + local DEP_CentOS_common="make gcc tar automake autoconf sysconftool bison flex \ + glibc-devel" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common glibc-devel.i686"Given that they are the same as Fedora, I think it is OK to:
Quoted 7 lines
Quoted 1 line
local DEP_CentOS_common="$DEP_Fedora_common"
In a previous version of the patch I had "DEP_RedHat_{common,x86_32,x86_64}" (to mean things that were common between all RH decendants, like Fedora or CentOS); but I couldn't make the include stuff work properly. Maybe just have a
DEP_RedHat_common, and allow the x86-specific ones to include it?But from the look of your patch the list of dependencies at the moment is exactly the same between Fedora and CentOS, so I would avoid DEP_RedHat_{common,x86_32,x86_64}, I would just local DEP_CentOS_common="$DEP_Fedora_common".
Quoted 21 lines
Quoted 20 lines
Quoted 8 lines
components/grub +0
-0if [[ $ARCH != "x86_64" && $ARCH != "x86_32" ]] thencomponents/libvirt +0
-0components/libvirt function libvirt_check_package() { · line 26
Quoted 9 lines
components/libvirt +6
-0@@ -18,6 +18,13 @@ function libvirt_check_package() { local DEP_Fedora_x86_32="$DEP_Fedora_common" local DEP_Fedora_x86_64="$DEP_Fedora_common" + local DEP_CentOS_common="patch make gcc libtool autoconf gettext-devel \ + python-devel libxslt yajl-devel libxml2-devel \ + device-mapper-devel libpciaccess-devel \ + libuuid-devel perl-XML-XPath" + local DEP_CentOS_x86_32="$DEP_CentOS_common" + local DEP_CentOS_x86_64="$DEP_CentOS_common"Same here, also please test the libvirt build: the list of dependencies is pretty big, I worry that one of them might actually differ from Fedora
Quoted 8 lines
Quoted 5 lines
If there were something missing, it wouldn't be a regression (since libvirt doesn't apply without this patch either). Testing libvirt is on my to-do list, but if I don't get to it, would you mind checking it in as-is (once the series is in better shape)? I'll definitely get libvirt working before the release.
Having the code in will give the impression that it works already, so I am not very happy about this, but OK.
I made the changes and committed.
PATCH 6/8 raisin: Break build into components and allow the sub-steps to be called individually
In reply to George DunlapThis makes it easier to debug just one aspect of the build.
---
CC: Stefano Stabellini <[email protected]>
--- lib/commands.sh | 16 ++++++++++++---- raise | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-)
lib/commands.sh +12 -4
@@ -45,17 +45,25 @@ function install-builddep() { YES=y check-builddep } -function build() { - check-builddep - +function build-only() { mkdir -p "$INST_DIR" &>/dev/null # build and install under $DESTDIR for_each_component build - +} + +function build-package() { build_package xen-system } +function build() { + check-builddep + + build-only + + build-package +} + function unraise() { for_each_component clean
raise +1 -1
@@ -64,7 +64,7 @@ do done case "$1" in - "install-builddep" | "build" | "install" | "configure" | "unraise" ) + "install-builddep" | "build" | "build-only" | "build-package" | "install" | "configure" | "unraise" ) COMMAND=$1 ;; *)
Signature · 1 line
1.9.1
Re: [PATCH 6/8] raisin: Break build into components and allow the sub-steps to be called individually
Quoted 49 lines · George Dunlap
This makes it easier to debug just one aspect of the build.
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- lib/commands.sh | 16 ++++++++++++---- raise | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-)lib/commands.sh +12
-4@@ -45,17 +45,25 @@ function install-builddep() { YES=y check-builddep } -function build() { - check-builddep - +function build-only() { mkdir -p "$INST_DIR" &>/dev/null # build and install under $DESTDIR for_each_component build - +} + +function build-package() { build_package xen-system } +function build() { + check-builddep + + build-only + + build-package +} + function unraise() { for_each_component cleanraise +0
-0
raise do · line 70
Quoted 8 lines
raise +1
-1@@ -64,7 +64,7 @@ do done case "$1" in - "install-builddep" | "build" | "install" | "configure" | "unraise" ) + "install-builddep" | "build" | "build-only" | "build-package" | "install" | "configure" | "unraise" ) COMMAND=$1 ;; *)
You have added two new commands, but they are not documented in the help function or in the README. As they stand they are "hidden" commands. Is that on purpose because they are supposed to be used just for debugging? Maybe it would be worth documenting debugging functions too somewhere.
Re: [PATCH 6/8] raisin: Break build into components and allow the sub-steps to be called individually
Quoted 52 lines · Stefano Stabellini
Quoted 51 lines · George Dunlap
This makes it easier to debug just one aspect of the build.
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- lib/commands.sh | 16 ++++++++++++---- raise | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-)lib/commands.sh +12
-4@@ -45,17 +45,25 @@ function install-builddep() { YES=y check-builddep } -function build() { - check-builddep - +function build-only() { mkdir -p "$INST_DIR" &>/dev/null # build and install under $DESTDIR for_each_component build - +} + +function build-package() { build_package xen-system } +function build() { + check-builddep + + build-only + + build-package +} + function unraise() { for_each_component cleanraise +0
-0@@ -64,7 +64,7 @@ do done
Quoted 11 lines
raise do · line 70
Quoted 6 lines
raise +1
-1case "$1" in - "install-builddep" | "build" | "install" | "configure" | "unraise" ) + "install-builddep" | "build" | "build-only" | "build-package" | "install" | "configure" | "unraise" ) COMMAND=$1 ;; *)You have added two new commands, but they are not documented in the help function or in the README. As they stand they are "hidden" commands. Is that on purpose because they are supposed to be used just for debugging? Maybe it would be worth documenting debugging functions too somewhere.
No, they were meant to be visible. I'll document them.
-George
PATCH 7/8 raisin: Rework component specification
In reply to George DunlapAllow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
---
CC: Stefano Stabellini <[email protected]>
--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)
defconfig +5 -0
@@ -1,5 +1,10 @@ # Config variables for raisin +# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt" + # Build config ## Make command to run MAKE="make -j2"
lib/common-functions.sh +35 -14
68 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH 7/8] raisin: Rework component specification
Quoted 8 lines · George Dunlap
Allow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
Signed-off-by George Dunlap <[email protected]>
Good idea, I wanted to fix the way we disable components for a while now
Quoted 11 lines
CC Stefano Stabellini <[email protected]>--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)defconfig +0
-0
defconfig line 6
Quoted 6 lines
defconfig +4
-0@@ -1,5 +1,10 @@ # Config variables for raisin +# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt"
I would just call this COMPONENTS, also see below.
Also please update the other comment in this file on how to disable components.
Quoted 8 lines
defconfig +0
-0# Build config ## Make command to run MAKE="make -j2"lib/common-functions.sh +0
-0
lib/common-functions.sh function common_init() { · line 38
Quoted 9 lines
lib/common-functions.sh +4
-1@@ -31,13 +31,41 @@ function common_init() { get_distro get_arch + get_components - for f in `cat "$BASEDIR"/components/series` + echo "Distro: $DISTRO" + echo "Arch: $ARCH" + echo "Components: $COMPONENTS"
if [[ $VERBOSE -eq 1 ]]
then
echo stuff
fi
To make the code nicer to read, we could have a function called verbose_echo:
function verbose_echo() {
if [[ $VERBOSE -eq 1 ]]
then
echo $*
fi
}lib/common-functions.sh function common_init() { · line 49
Quoted 10 lines
lib/common-functions.sh +5
-0+ for f in $COMPONENTS do source "$BASEDIR"/components/"$f" done } +function get_components() { + if [[ -z "$COMPONENTS" ]] + then + COMPONENTS="$DEFAULT_COMPONENTS"
Stray tab.
I would call our internal components variable RAISIN_COMPONENTS and the one in the config and exposed to users COMPONENTS.
lib/common-functions.sh function common_init() { · line 59
Quoted 10 lines
lib/common-functions.sh +10
-0+ fi + + if [[ -z "$COMPONENTS" ]] + then + local component + for component in `cat "$BASEDIR"/components/series` + do + local capital + capital=`echo $component | tr '[:lower:]' '[:upper:]'` + if eval [[ ! -z \$"$capital"_UPSTREAM_REVISION ]]
please rebase: _UPSTREAM is gone
lib/common-functions.sh function common_init() { · line 62
Quoted 3 lines
lib/common-functions.sh +3
-0+ then + COMPONENTS="$COMPONENTS $component" + echo "Found component $component"
verbose_echo
lib/common-functions.sh function common_init() { · line 65
Quoted 3 lines
lib/common-functions.sh +3
-0+ fi + done + export COMPONENTS
a bad mix of spaces and tabs in this function
Quoted 36 lines
lib/common-functions.sh +9
-13+ fi +} + function get_distro() { if [[ -x "`which lsb_release 2>/dev/null`" ]] then@@ -222,20 +250,13 @@ function stop_initscripts() { } function for_each_component () { - for component in `cat "$BASEDIR"/components/series` + local component + + for component in $COMPONENTS do - capital=`echo $component | tr '[:lower:]' '[:upper:]'` - if [[ $VERBOSE -eq 1 ]] - then - echo -n "$capital"_REVISION =" " - eval echo \$"$capital"_REVISION - fi - if eval [[ ! -z \$"$capital"_REVISION ]] - then - [[ $VERBOSE -eq 0 ]] || echo calling "$component"_"$1" - "$component"_"$1" - [[ $VERBOSE -eq 0 ]] || echo "$component"_"$1" done - fi + [[ $VERBOSE -eq 0 ]] || echo calling "$component"_"$1" + "$component"_"$1" + [[ $VERBOSE -eq 0 ]] || echo "$component"_"$1" done done }Signature · 1 line
1.9.1
Re: [PATCH 7/8] raisin: Rework component specification
Quoted 26 lines · Stefano Stabellini
Quoted 8 lines · George Dunlap
Allow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
Signed-off-by George Dunlap <[email protected]>Good idea, I wanted to fix the way we disable components for a while now
Quoted 13 lines
CC Stefano Stabellini <[email protected]>--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)defconfig +0
-0@@ -1,5 +1,10 @@ # Config variables for raisin
Quoted 7 lines
defconfig line 6
Quoted 4 lines
defconfig +4
-0+# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt"I would just call this COMPONENTS, also see below.
Also please update the other comment in this file on how to disable components.
I think the problem here is that if you just say "COMPONENTS=" in the config file, then it will override the COMPONENTS= on the command-line (i.e., 'COMPONENTS="xen" ./raise build' no longer works as expected).
We could use one of the "set if not set already" bashisms, but I think those are all pretty ugly, and probably easy to accidentally forget when editing. Since the config file is part of the public interface, I thought it important to keep it simple and clean.
Quoted 26 lines
Quoted 8 lines
defconfig +0
-0# Build config ## Make command to run MAKE="make -j2"lib/common-functions.sh +0
-0lib/common-functions.sh function common_init() { · line 38
Quoted 9 lines
lib/common-functions.sh +4
-1@@ -31,13 +31,41 @@ function common_init() { get_distro get_arch + get_components - for f in `cat "$BASEDIR"/components/series` + echo "Distro: $DISTRO" + echo "Arch: $ARCH" + echo "Components: $COMPONENTS"if [[ $VERBOSE -eq 1 ]]
then
echo stuff
fiTo make the code nicer to read, we could have a function called
verbose_echo:
Quoted 6 lines
function verbose_echo() {
if [[ $VERBOSE -eq 1 ]]
then
echo $*
fi
}I'll do the 'if' first, and maybe look at making a function later.
Quoted 6 lines
lib/common-functions.sh function common_init() { · line 49
Quoted 4 lines
lib/common-functions.sh +4
-0+function get_components() { + if [[ -z "$COMPONENTS" ]] + then + COMPONENTS="$DEFAULT_COMPONENTS"Stray tab.
Weird... I thought I had emacs set to use no tabs. I'll take a look...
Quoted 2 lines
I would call our internal components variable
RAISIN_COMPONENTSand the one in the config and exposed to users COMPONENTS.
Any revision to this given my answer above? Off the top of my head I don't see a reason to have three variables.
-George
Re: [PATCH 7/8] raisin: Rework component specification
Quoted 35 lines · George Dunlap
Quoted 26 lines · Stefano Stabellini
Quoted 8 lines · George Dunlap
Allow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
Signed-off-by George Dunlap <[email protected]>Good idea, I wanted to fix the way we disable components for a while now
Quoted 13 lines
CC Stefano Stabellini <[email protected]>--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)defconfig +0
-0@@ -1,5 +1,10 @@ # Config variables for raisinQuoted 7 lines
defconfig line 6
Quoted 4 lines
defconfig +4
-0+# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt"I would just call this COMPONENTS, also see below.
Also please update the other comment in this file on how to disable components.
Quoted 8 lines
I think the problem here is that if you just say "COMPONENTS=" in the config file, then it will override the COMPONENTS= on the command-line (i.e., 'COMPONENTS="xen" ./raise build' no longer works as expected).
We could use one of the "set if not set already" bashisms, but I think those are all pretty ugly, and probably easy to accidentally forget when editing. Since the config file is part of the public interface, I thought it important to keep it simple and clean.
You are right, it is important to keep the config file simple and clean, that is why I was suggesting to use a simpler name for the config variable. I certainly wouldn't want any of the "set if not set already" constructs in the config file.
I guess that having COMPONENTS="xen" ./raise build would be nice and it is simpler to achieve it by having a different name for the variable in the config file.
OK, you convinced me :-)
Quoted 52 lines
Quoted 26 lines
Quoted 8 lines
defconfig +0
-0# Build config ## Make command to run MAKE="make -j2"lib/common-functions.sh +0
-0lib/common-functions.sh function common_init() { · line 38
Quoted 9 lines
lib/common-functions.sh +4
-1@@ -31,13 +31,41 @@ function common_init() { get_distro get_arch + get_components - for f in `cat "$BASEDIR"/components/series` + echo "Distro: $DISTRO" + echo "Arch: $ARCH" + echo "Components: $COMPONENTS"if [[ $VERBOSE -eq 1 ]]
then
echo stuff
fiTo make the code nicer to read, we could have a function called
verbose_echo:Quoted 6 lines
function verbose_echo() { if [[ $VERBOSE -eq 1 ]] then echo $* fi }I'll do the 'if' first, and maybe look at making a function later.
Quoted 6 lines
lib/common-functions.sh function common_init() { · line 49
Quoted 4 lines
lib/common-functions.sh +4
-0+function get_components() { + if [[ -z "$COMPONENTS" ]] + then + COMPONENTS="$DEFAULT_COMPONENTS"Stray tab.
Weird... I thought I had emacs set to use no tabs. I'll take a look...
Quoted 2 lines
I would call our internal components variable
RAISIN_COMPONENTSand the one in the config and exposed to users COMPONENTS.Any revision to this given my answer above? Off the top of my head I don't see a reason to have three variables.
-George
Re: [PATCH 7/8] raisin: Rework component specification
In reply to George DunlapQuoted 78 lines · George Dunlap
Allow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)defconfig +5
-0@@ -1,5 +1,10 @@ # Config variables for raisin +# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt" + # Build config ## Make command to run MAKE="make -j2"lib/common-functions.sh +29
-1@@ -31,13 +31,41 @@ function common_init() { get_distro get_arch + get_components - for f in `cat "$BASEDIR"/components/series` + echo "Distro: $DISTRO" + echo "Arch: $ARCH" + echo "Components: $COMPONENTS" + + for f in $COMPONENTS do source "$BASEDIR"/components/"$f" done } +function get_components() { + if [[ -z "$COMPONENTS" ]] + then + COMPONENTS="$DEFAULT_COMPONENTS" + fi + + if [[ -z "$COMPONENTS" ]] + then + local component + for component in `cat "$BASEDIR"/components/series` + do + local capital + capital=`echo $component | tr '[:lower:]' '[:upper:]'` + if eval [[ ! -z \$"$capital"_UPSTREAM_REVISION ]] + then + COMPONENTS="$COMPONENTS $component" + echo "Found component $component" + fi + done + export COMPONENTS + fi +} + function get_distro() { if [[ -x "`which lsb_release 2>/dev/null`" ]] then
lib/common-functions.sh function stop_initscripts() { · line 253
Quoted 5 lines
lib/common-functions.sh +1
-1@@ -222,20 +250,13 @@ function stop_initscripts() { } function for_each_component () { - for component in `cat "$BASEDIR"/components/series` + local component
One important thing here is that the order is important: xen is the first item in the series file for a reason. I think we should use the COMPONENTS variable to check for what components are enabled, but then still use the series file for the ordering.
Quoted 23 lines
lib/common-functions.sh +4
-12+ for component in $COMPONENTS do - capital=`echo $component | tr '[:lower:]' '[:upper:]'` - if [[ $VERBOSE -eq 1 ]] - then - echo -n "$capital"_REVISION =" " - eval echo \$"$capital"_REVISION - fi - if eval [[ ! -z \$"$capital"_REVISION ]] - then - [[ $VERBOSE -eq 0 ]] || echo calling "$component"_"$1" - "$component"_"$1" - [[ $VERBOSE -eq 0 ]] || echo "$component"_"$1" done - fi + [[ $VERBOSE -eq 0 ]] || echo calling "$component"_"$1" + "$component"_"$1" + [[ $VERBOSE -eq 0 ]] || echo "$component"_"$1" done done }Signature · 1 line
1.9.1
Re: [PATCH 7/8] raisin: Rework component specification
Quoted 81 lines · Stefano Stabellini
Quoted 80 lines · George Dunlap
Allow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)defconfig +5
-0@@ -1,5 +1,10 @@ # Config variables for raisin +# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt" + # Build config ## Make command to run MAKE="make -j2"lib/common-functions.sh +29
-1@@ -31,13 +31,41 @@ function common_init() { get_distro get_arch + get_components - for f in `cat "$BASEDIR"/components/series` + echo "Distro: $DISTRO" + echo "Arch: $ARCH" + echo "Components: $COMPONENTS" + + for f in $COMPONENTS do source "$BASEDIR"/components/"$f" done } +function get_components() { + if [[ -z "$COMPONENTS" ]] + then + COMPONENTS="$DEFAULT_COMPONENTS" + fi + + if [[ -z "$COMPONENTS" ]] + then + local component + for component in `cat "$BASEDIR"/components/series` + do + local capital + capital=`echo $component | tr '[:lower:]' '[:upper:]'` + if eval [[ ! -z \$"$capital"_UPSTREAM_REVISION ]] + then + COMPONENTS="$COMPONENTS $component" + echo "Found component $component" + fi + done + export COMPONENTS + fi +} + function get_distro() { if [[ -x "`which lsb_release 2>/dev/null`" ]] then@@ -222,20 +250,13 @@ function stop_initscripts() { }
Quoted 8 lines
lib/common-functions.sh function stop_initscripts() { · line 253
Quoted 3 lines
lib/common-functions.sh +1
-1function for_each_component () { - for component in `cat "$BASEDIR"/components/series` + local componentOne important thing here is that the order is important: xen is the first item in the series file for a reason. I think we should use the COMPONENTS variable to check for what components are enabled, but then still use the series file for the ordering.
Yes, I thought about that. I had the idea it wouldn't be the easiest thing to do in bash, but I'll take a look.
FYI I basically spent the "development day" for 4 weeks on those two series, so it may be a while before I get back to it. :-) (Depends on how much review there is to do.)
-George
Re: [PATCH 7/8] raisin: Rework component specification
Quoted 91 lines · George Dunlap
Quoted 81 lines · Stefano Stabellini
Quoted 80 lines · George Dunlap
Allow COMPONENTS to be specified in the config (or on the command-line)
Now you can keep all components enabled in your config but build only one like so:
COMPONENTS="xen" ./raise build
Signed-off-by George Dunlap <[email protected]>---
CC: Stefano Stabellini <[email protected]>--- defconfig | 5 +++++ lib/common-functions.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 14 deletions(-)defconfig +5
-0@@ -1,5 +1,10 @@ # Config variables for raisin +# Components +# All components: xen grub libvirt +# Core xen functionality: xen +DEFAULT_COMPONENTS="xen grub libvirt" + # Build config ## Make command to run MAKE="make -j2"lib/common-functions.sh +29
-1@@ -31,13 +31,41 @@ function common_init() { get_distro get_arch + get_components - for f in `cat "$BASEDIR"/components/series` + echo "Distro: $DISTRO" + echo "Arch: $ARCH" + echo "Components: $COMPONENTS" + + for f in $COMPONENTS do source "$BASEDIR"/components/"$f" done } +function get_components() { + if [[ -z "$COMPONENTS" ]] + then + COMPONENTS="$DEFAULT_COMPONENTS" + fi + + if [[ -z "$COMPONENTS" ]] + then + local component + for component in `cat "$BASEDIR"/components/series` + do + local capital + capital=`echo $component | tr '[:lower:]' '[:upper:]'` + if eval [[ ! -z \$"$capital"_UPSTREAM_REVISION ]] + then + COMPONENTS="$COMPONENTS $component" + echo "Found component $component" + fi + done + export COMPONENTS + fi +} + function get_distro() { if [[ -x "`which lsb_release 2>/dev/null`" ]] then@@ -222,20 +250,13 @@ function stop_initscripts() { }Quoted 8 lines
lib/common-functions.sh function stop_initscripts() { · line 253
Quoted 3 lines
lib/common-functions.sh +1
-1function for_each_component () { - for component in `cat "$BASEDIR"/components/series` + local componentOne important thing here is that the order is important: xen is the first item in the series file for a reason. I think we should use the COMPONENTS variable to check for what components are enabled, but then still use the series file for the ordering.
Quoted 6 lines
Yes, I thought about that. I had the idea it wouldn't be the easiest thing to do in bash, but I'll take a look.
FYI I basically spent the "development day" for 4 weeks on those two series, so it may be a while before I get back to it. :-) (Depends on how much review there is to do.)
OK. I renamed DEFAULT_COMPONENTS to ENABLED_COMPONENTS, reworked this loop, added documentation and committed the result.
PATCH 8/8 raisin: RFC Add blktap2 as an external tree
In reply to George DunlapUntil we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
---
Note: For now use the "upstream" XenServer repo.
Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.git out/blktap25/rfc-v2
--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktap
components/blktap new file +47 -0
@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32" + + echo Checking blktap dependencies + eval check-package \$DEP_"$DISTRO"_"$ARCH" +} + +function blktap_build() { + cd "$BASEDIR" + git-checkout $BLKTAP_URL $BLKTAP_REVISION blktap-dir + cd blktap-dir + ./autogen.sh + ./configure --prefix=$PREFIX + $MAKE + $MAKE install DESTDIR="$INST_DIR" + cd "$BASEDIR" +} + +function blktap_clean() { + cd "$BASEDIR" + if [[ -d blktap-dir ]] + then + rm -rf blktap-dir + fi +} + +function blktap_configure() { + : +} + +function blktap_unconfigure() { + : +}
components/series +1 -0
@@ -1,3 +1,4 @@ +blktap xen qemu grub
components/xen +5 -0
@@ -29,7 +29,12 @@ function xen_build() { cd "$BASEDIR" git-checkout $XEN_URL $XEN_REVISION xen-dir cd xen-dir + CFLAGS="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386 + CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \ + SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ $RAISIN_MAKE $RAISIN_MAKE install DESTDIR="$INST_DIR" cd "$BASEDIR"
defconfig +6 -3
@@ -1,9 +1,9 @@ # Config variables for raisin # Components -# All components: xen grub libvirt -# Core xen functionality: xen -DEFAULT_COMPONENTS="xen grub libvirt" +# All components: blktap xen grub libvirt +# Core xen functionality: xen blktap +DEFAULT_COMPONENTS="blktap xen grub libvirt" # Build config ## Make command to run
@@ -22,6 +22,8 @@ XEN_URL="git://xenbits.xen.org/xen.git" QEMU_URL="git://git.qemu.org/qemu.git" GRUB_URL="git://git.savannah.gnu.org/grub.git" LIBVIRT_URL="git://libvirt.org/libvirt.git" +BLKTAP_URL=https://github.com/xapi-project/blktap.git +#BLKTAP_URL=git://xenbits.xen.org/blktap.git # Software versions. Leave blank if you want to avoid the build, like # this: GRUB_REVISION=
@@ -30,3 +32,4 @@ XEN_REVISION="master" QEMU_REVISION="master" GRUB_REVISION="master" LIBVIRT_REVISION="master" +BLKTAP_REVISION="blktap2"
Signature · 1 line
1.9.1
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 33 lines · George Dunlap
Until we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
Signed-off-by George Dunlap <[email protected]>---
Note: For now use the "upstream" XenServer repo.Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.gitout/blktap25/rfc-v2CC Stefano Stabellini <[email protected]>--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktapcomponents/blktap new file +4
-0@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev"
components/blktap line 14
Quoted 10 lines
components/blktap new file +10
-0+ local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel"
DEP_CentOS_common="$DEP_Fedora_common"
components/blktap line 16
Quoted 2 lines
components/blktap new file +2
-0+ local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32"
Redhat? I don't know no Redhat.
Quoted 10 lines
components/blktap new file +10
-0+ echo Checking blktap dependencies + eval check-package \$DEP_"$DISTRO"_"$ARCH" +} + +function blktap_build() { + cd "$BASEDIR" + git-checkout $BLKTAP_URL $BLKTAP_REVISION blktap-dir + cd blktap-dir + ./autogen.sh + ./configure --prefix=$PREFIX
components/blktap line 37
Quoted 10 lines
components/blktap new file +10
-0+ $MAKE + $MAKE install DESTDIR="$INST_DIR" + cd "$BASEDIR" +} + +function blktap_clean() { + cd "$BASEDIR" + if [[ -d blktap-dir ]] + then + rm -rf blktap-dir
Stray tabs. Do we need the emacs config stanza somewhere in raisin?
components/blktap line 47
Quoted 10 lines
components/blktap new file +10
-0+ fi +} + +function blktap_configure() { + : +} + +function blktap_unconfigure() { + : +}
Much better than my echo. Maybe submit a patch to replace useless echo in configure and unconfigure functions with :
components/series line 2
Quoted 7 lines
components/series +1
-0@@ -1,3 +1,4 @@ +blktap xen
I take this is on purpose so that blktap is built before xen
Quoted 7 lines
components/series +0
-0qemu grubcomponents/xen +0
-0
components/xen function xen_build() { · line 37
Quoted 9 lines
components/xen +5
-0@@ -29,7 +29,12 @@ function xen_build() { cd "$BASEDIR" git-checkout $XEN_URL $XEN_REVISION xen-dir cd xen-dir + CFLAGS="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386 + CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \ + SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \
Does this work even if blktap is actually disabled in the raisin build? If so, then fine.
Actually I think that the xen configure script should be able to figure out whether it can pick up blktap from an external location automatically with the CFLAGS and LDFLAGS you set.
Quoted 37 lines
components/xen +0
-0$RAISIN_MAKE $RAISIN_MAKE install DESTDIR="$INST_DIR" cd "$BASEDIR"defconfig +6
-3@@ -1,9 +1,9 @@ # Config variables for raisin # Components -# All components: xen grub libvirt -# Core xen functionality: xen -DEFAULT_COMPONENTS="xen grub libvirt" +# All components: blktap xen grub libvirt +# Core xen functionality: xen blktap +DEFAULT_COMPONENTS="blktap xen grub libvirt" # Build config ## Make command to run@@ -22,6 +22,8 @@ XEN_URL="git://xenbits.xen.org/xen.git" QEMU_URL="git://git.qemu.org/qemu.git" GRUB_URL="git://git.savannah.gnu.org/grub.git" LIBVIRT_URL="git://libvirt.org/libvirt.git" +BLKTAP_URL=https://github.com/xapi-project/blktap.git +#BLKTAP_URL=git://xenbits.xen.org/blktap.git # Software versions. Leave blank if you want to avoid the build, like # this: GRUB_REVISION=@@ -30,3 +32,4 @@ XEN_REVISION="master" QEMU_REVISION="master" GRUB_REVISION="master" LIBVIRT_REVISION="master" +BLKTAP_REVISION="blktap2"Signature · 1 line
1.9.1
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 4 lines · Stefano Stabellini
components/blktap line 16
Quoted 2 lines
components/blktap new file +2
-0+ local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32"Redhat? I don't know no Redhat.
Is the use of x86_32 rather than common on the x86_64 case deliberate?
Ian.
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
In reply to Stefano StabelliniQuoted 48 lines · Stefano Stabellini
Quoted 33 lines · George Dunlap
Until we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
Signed-off-by George Dunlap <[email protected]>---
Note: For now use the "upstream" XenServer repo.Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.gitout/blktap25/rfc-v2CC Stefano Stabellini <[email protected]>--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktapcomponents/blktap new file +4
-0@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev"components/blktap line 14
Quoted 10 lines
components/blktap new file +10
-0+ local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel"DEP_CentOS_common="$DEP_Fedora_common"
Quoted 4 lines
components/blktap line 16
Quoted 2 lines
components/blktap new file +2
-0+ local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32"Redhat? I don't know no Redhat.
Sorry, artifacts from a previous version of the patch...
Quoted 5 lines
Quoted 5 lines
components/blktap new file +5
-0+ fi +} + +function blktap_configure() { + :
Quoted 8 lines
components/blktap line 47
Quoted 5 lines
components/blktap new file +5
-0+} + +function blktap_unconfigure() { + : +}Much better than my echo. Maybe submit a patch to replace useless echo in configure and unconfigure functions with :
I can put it on my to-do list, but it may be a while before it reaches the top. :-)
Quoted 9 lines
components/series line 2
Quoted 7 lines
components/series +1
-0@@ -1,3 +1,4 @@ +blktap xenI take this is on purpose so that blktap is built before xen
Yes, as Xen has to link against the libraries.
Quoted 11 lines
Quoted 11 lines
components/series +0
-0qemu grubcomponents/xen +1
-0@@ -29,7 +29,12 @@ function xen_build() { cd "$BASEDIR" git-checkout $XEN_URL $XEN_REVISION xen-dir cd xen-dir + CFLAGS="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \
Quoted 8 lines
components/xen function xen_build() { · line 37
Quoted 5 lines
components/xen +4
-0+ LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386 + CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \ + SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \Does this work even if blktap is actually disabled in the raisin build? If so, then fine.
I don't think I've tested it, but in theory yes it should work. If blktap support isn't specified, the patch series I submitted to xen-unstable will automatically enable blktap if found and disable it if not found. So if you have a clean raisin repo and just build the xen component, it should build it without blktap.
(With my patches, if you specify --enable-blktap and it can't find it, config will throw an error. But we're not enabling it.)
Quoted 3 lines
Actually I think that the xen configure script should be able to figure out whether it can pick up blktap from an external location automatically with the CFLAGS and LDFLAGS you set.
Actually, what would be better is if you could just set "-I$INST_DIR/$PREFIX/include" and "-L$INST_DIR/$PREFIX/lib" and be done with it. But the blktap2 headers are broken at the moment: they're placed in subdirectories on install time that don't reflect the directory structure used when building, so if you don't specify both subdirectories explicitly, it won't compile.
That's something I plan to fix, but it may take a bit to get back to it.
-George
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 104 lines · George Dunlap
Quoted 48 lines · Stefano Stabellini
Quoted 33 lines · George Dunlap
Until we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
Signed-off-by George Dunlap <[email protected]>---
Note: For now use the "upstream" XenServer repo.Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.gitout/blktap25/rfc-v2CC Stefano Stabellini <[email protected]>--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktapcomponents/blktap new file +4
-0@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev"components/blktap line 14
Quoted 10 lines
components/blktap new file +10
-0+ local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel"DEP_CentOS_common="$DEP_Fedora_common"
Quoted 4 lines
components/blktap line 16
Quoted 2 lines
components/blktap new file +2
-0+ local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32"Redhat? I don't know no Redhat.
Sorry, artifacts from a previous version of the patch...
Quoted 5 lines
Quoted 5 lines
components/blktap new file +5
-0+ fi +} + +function blktap_configure() { + :Quoted 8 lines
components/blktap line 47
Quoted 5 lines
components/blktap new file +5
-0+} + +function blktap_unconfigure() { + : +}Much better than my echo. Maybe submit a patch to replace useless echo in configure and unconfigure functions with :
I can put it on my to-do list, but it may be a while before it reaches the top. :-)
Quoted 9 lines
components/series line 2
Quoted 7 lines
components/series +1
-0@@ -1,3 +1,4 @@ +blktap xenI take this is on purpose so that blktap is built before xen
Yes, as Xen has to link against the libraries.
Quoted 11 lines
Quoted 11 lines
components/series +0
-0qemu grubcomponents/xen +1
-0@@ -29,7 +29,12 @@ function xen_build() { cd "$BASEDIR" git-checkout $XEN_URL $XEN_REVISION xen-dir cd xen-dir + CFLAGS="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \Quoted 8 lines
components/xen function xen_build() { · line 37
Quoted 5 lines
components/xen +4
-0+ LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386 + CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \ + SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \Does this work even if blktap is actually disabled in the raisin build? If so, then fine.
Quoted 8 lines
I don't think I've tested it, but in theory yes it should work. If blktap support isn't specified, the patch series I submitted to xen-unstable will automatically enable blktap if found and disable it if not found. So if you have a clean raisin repo and just build the xen component, it should build it without blktap.
(With my patches, if you specify --enable-blktap and it can't find it, config will throw an error. But we're not enabling it.)
If you test it and it works both with and without blktap, then I am OK with it as is.
Quoted 15 lines
Quoted 3 lines
Actually I think that the xen configure script should be able to figure out whether it can pick up blktap from an external location automatically with the CFLAGS and LDFLAGS you set.
Actually, what would be better is if you could just set "-I$INST_DIR/$PREFIX/include" and "-L$INST_DIR/$PREFIX/lib" and be done with it. But the blktap2 headers are broken at the moment: they're placed in subdirectories on install time that don't reflect the directory structure used when building, so if you don't specify both subdirectories explicitly, it won't compile.
That's something I plan to fix, but it may take a bit to get back to it.
-George
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
In reply to George DunlapQuoted 50 lines · George Dunlap
Until we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
Signed-off-by George Dunlap <[email protected]>---
Note: For now use the "upstream" XenServer repo.Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.gitout/blktap25/rfc-v2CC Stefano Stabellini <[email protected]>--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktapcomponents/blktap new file +21
-0@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32" + + echo Checking blktap dependencies + eval check-package \$DEP_"$DISTRO"_"$ARCH" +} +
components/blktap line 31
Quoted 10 lines
components/blktap new file +10
-0+function blktap_build() { + cd "$BASEDIR" + git-checkout $BLKTAP_URL $BLKTAP_REVISION blktap-dir + cd blktap-dir + ./autogen.sh + ./configure --prefix=$PREFIX + $MAKE + $MAKE install DESTDIR="$INST_DIR" + cd "$BASEDIR" +}
I think we need to disable the build on architectures other than x86, see grub for example
Quoted 75 lines
components/blktap new file +15
-0+function blktap_clean() { + cd "$BASEDIR" + if [[ -d blktap-dir ]] + then + rm -rf blktap-dir + fi +} + +function blktap_configure() { + : +} + +function blktap_unconfigure() { + : +}components/series +1
-0@@ -1,3 +1,4 @@ +blktap xen qemu grubcomponents/xen +5
-0@@ -29,7 +29,12 @@ function xen_build() { cd "$BASEDIR" git-checkout $XEN_URL $XEN_REVISION xen-dir cd xen-dir + CFLAGS="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386 + CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ + LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \ + SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ $RAISIN_MAKE $RAISIN_MAKE install DESTDIR="$INST_DIR" cd "$BASEDIR"defconfig +6
-3@@ -1,9 +1,9 @@ # Config variables for raisin # Components -# All components: xen grub libvirt -# Core xen functionality: xen -DEFAULT_COMPONENTS="xen grub libvirt" +# All components: blktap xen grub libvirt +# Core xen functionality: xen blktap +DEFAULT_COMPONENTS="blktap xen grub libvirt" # Build config ## Make command to run@@ -22,6 +22,8 @@ XEN_URL="git://xenbits.xen.org/xen.git" QEMU_URL="git://git.qemu.org/qemu.git" GRUB_URL="git://git.savannah.gnu.org/grub.git" LIBVIRT_URL="git://libvirt.org/libvirt.git" +BLKTAP_URL=https://github.com/xapi-project/blktap.git +#BLKTAP_URL=git://xenbits.xen.org/blktap.git # Software versions. Leave blank if you want to avoid the build, like # this: GRUB_REVISION=@@ -30,3 +32,4 @@ XEN_REVISION="master" QEMU_REVISION="master" GRUB_REVISION="master" LIBVIRT_REVISION="master" +BLKTAP_REVISION="blktap2"Signature · 1 line
1.9.1
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 56 lines · Stefano Stabellini
Quoted 55 lines · George Dunlap
Until we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
Signed-off-by George Dunlap <[email protected]>---
Note: For now use the "upstream" XenServer repo.Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.gitout/blktap25/rfc-v2CC Stefano Stabellini <[email protected]>--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktapcomponents/blktap new file +26
-0@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32" + + echo Checking blktap dependencies + eval check-package \$DEP_"$DISTRO"_"$ARCH" +} + +function blktap_build() { + cd "$BASEDIR" + git-checkout $BLKTAP_URL $BLKTAP_REVISION blktap-dir + cd blktap-dir + ./autogen.sh
Quoted 8 lines
components/blktap line 31
Quoted 5 lines
components/blktap new file +5
-0+ ./configure --prefix=$PREFIX + $MAKE + $MAKE install DESTDIR="$INST_DIR" + cd "$BASEDIR" +}I think we need to disable the build on architectures other than x86, see grub for example
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
And in any case the long-term plan is to get blktap3 working as well, which doesn't require kernel-space drivers.
Or do you mean on systems other than Linux?
-George
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 66 lines · George Dunlap
Quoted 56 lines · Stefano Stabellini
Quoted 55 lines · George Dunlap
Until we start hosting the blktap repo on xenbits, use the one from github.
Also, we need to pass in the directories where to find the libblktapctl headers in the Xen build.
Signed-off-by George Dunlap <[email protected]>---
Note: For now use the "upstream" XenServer repo.Also, to build with this you need the patches to allow Xen to use an out-of-tree blktap, which can be found here:
git://xenbits.xen.org/people/gdunlap/xen.gitout/blktap25/rfc-v2CC Stefano Stabellini <[email protected]>--- components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++ components/series | 1 + components/xen | 5 +++++ defconfig | 9 ++++++--- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 components/blktapcomponents/blktap new file +26
-0@@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +function blktap_check_package() { + local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev uuid-dev openssl-dev" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + + local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file libaio-devel libuuid-devel openssl-devel" + local DEP_CentOS_x86_32="$DEP_Redhat_common" + local DEP_CentOS_x86_64="$DEP_Redhat_x86_32" + + echo Checking blktap dependencies + eval check-package \$DEP_"$DISTRO"_"$ARCH" +} + +function blktap_build() { + cd "$BASEDIR" + git-checkout $BLKTAP_URL $BLKTAP_REVISION blktap-dir + cd blktap-dir + ./autogen.shQuoted 8 lines
components/blktap line 31
Quoted 5 lines
components/blktap new file +5
-0+ ./configure --prefix=$PREFIX + $MAKE + $MAKE install DESTDIR="$INST_DIR" + cd "$BASEDIR" +}I think we need to disable the build on architectures other than x86, see grub for example
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Quoted 4 lines
And in any case the long-term plan is to get blktap3 working as well, which doesn't require kernel-space drivers.
Or do you mean on systems other than Linux?
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 7 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
Quoted 9 lines
Quoted 4 lines
And in any case the long-term plan is to get blktap3 working as well, which doesn't require kernel-space drivers.
Or do you mean on systems other than Linux?
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 14 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 3 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Quoted 7 lines
Quoted 4 lines
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
So from my discussions w/ the XenServer guys, it seems that:
1. The "master" branch of the blktap.git repo contains support for *both* blktap3 and blktap2.5 (with a kernel module)
2. XenServer uses blktap3 for guest access, but still use the blktap2.5 w/ kernel module for dom0 access to guest disks, to avoid the possibility of hitting a scalability limit due to grant references.
So from raisin's perspective, the only difference between blktap2.5 and blktap3 is using the "master" branch rather than the "blktap2" branch of the repo.
Whether we maintain support for blktap2.5 in libxl is a matter for the Xen maintainers; but if xapi is ever going to start using libxl, it will certainly need to be able to do so.
(Dave / David, please correct me if I'm wrong.)
That said, there's no harm in disabling it on ARM to begin with, and enabling it once blktap3 works.
-George
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 28 lines · George Dunlap
Quoted 14 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 3 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Quoted 7 lines
Quoted 4 lines
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
So from my discussions w/ the XenServer guys, it seems that:
1. The "master" branch of the blktap.git repo contains support for *both* blktap3 and blktap2.5 (with a kernel module)
Quoted 7 lines
2. XenServer uses blktap3 for guest access, but still use the blktap2.5 w/ kernel module for dom0 access to guest disks, to avoid the possibility of hitting a scalability limit due to grant references.
So from raisin's perspective, the only difference between blktap2.5 and blktap3 is using the "master" branch rather than the "blktap2" branch of the repo.
That is not entirely true: compiling and installing a kernel module is quite different from userspace stuff, at least in terms of dependencies and installation paths.
Quoted 8 lines
Whether we maintain support for blktap2.5 in libxl is a matter for the Xen maintainers; but if xapi is ever going to start using libxl, it will certainly need to be able to do so.
(Dave / David, please correct me if I'm wrong.)
That said, there's no harm in disabling it on ARM to begin with, and enabling it once blktap3 works.
Yes, I would the code in Raisin to actually work :-)
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 33 lines · Stefano Stabellini
Quoted 32 lines · George Dunlap
Quoted 14 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 3 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Quoted 7 lines
Quoted 4 lines
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
So from my discussions w/ the XenServer guys, it seems that:
1. The "master" branch of the blktap.git repo contains support for *both* blktap3 and blktap2.5 (with a kernel module)
2. XenServer uses blktap3 for guest access, but still use the blktap2.5 w/ kernel module for dom0 access to guest disks, to avoid the possibility of hitting a scalability limit due to grant references.
Quoted 7 lines
Quoted 3 lines
So from raisin's perspective, the only difference between blktap2.5 and blktap3 is using the "master" branch rather than the "blktap2" branch of the repo.
That is not entirely true: compiling and installing a kernel module is quite different from userspace stuff, at least in terms of dependencies and installation paths.
The blktap.git repo doesn't compile a kernel module; it's only building userspace binaries and libraries. Libxl already knows how to detect the presence or absence of the kernel module and behave accordingly.
Quoted 10 lines
Quoted 8 lines
Whether we maintain support for blktap2.5 in libxl is a matter for the Xen maintainers; but if xapi is ever going to start using libxl, it will certainly need to be able to do so.
(Dave / David, please correct me if I'm wrong.)
That said, there's no harm in disabling it on ARM to begin with, and enabling it once blktap3 works.
Yes, I would the code in Raisin to actually work :-)
The code should work just fine. When run on an ARM system without a blktap2 kernel module, libxl should detect that blktap2 is not available and not use it. If someone builds their own ARM kernel with blktap2 enabled, it will use it.
The only reason to disable this on ARM at the minute is because you *believe* that nobody will ever want to build the blktap2 kernel module on ARM, and so you want to avoid the build overhead and space overhead of compiling and using dead code. If that's your goal, you might get more mileage out of disabling stuff like xenmon or the paging code. :-)
There's already an ARM Server SIG for CentOS; once that gets completed, Xen4CentOS project will probably also do an ARM server port, at which point it will almost certainly attempt to port over the blktap2 kernel modules.
Enabling blktap.git on ARM by default means a bit of extra compilation time and code in the resulting binary (though not much at all). Disabling it on ARM means that we'll have to enable it again once either
1) we get blktap3 working, or 2) someone shows an interest in using blktap2 on ARM.
Both costs are so low as to make it a bike-shed issue in my mind. I'd paint the bike shed "Enable it by arm on default", but repainting the shed when the time comes will be easy, so I don't care that much. I just want to make it clear that it *is* a bike-shed issue. :-)
-George
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 62 lines · George Dunlap
Quoted 33 lines · Stefano Stabellini
Quoted 32 lines · George Dunlap
Quoted 14 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 3 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Quoted 7 lines
Quoted 4 lines
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
So from my discussions w/ the XenServer guys, it seems that:
1. The "master" branch of the blktap.git repo contains support for *both* blktap3 and blktap2.5 (with a kernel module)
2. XenServer uses blktap3 for guest access, but still use the blktap2.5 w/ kernel module for dom0 access to guest disks, to avoid the possibility of hitting a scalability limit due to grant references.
Quoted 7 lines
Quoted 3 lines
So from raisin's perspective, the only difference between blktap2.5 and blktap3 is using the "master" branch rather than the "blktap2" branch of the repo.
That is not entirely true: compiling and installing a kernel module is quite different from userspace stuff, at least in terms of dependencies and installation paths.
The blktap.git repo doesn't compile a kernel module; it's only building userspace binaries and libraries. Libxl already knows how to detect the presence or absence of the kernel module and behave accordingly.
Quoted 10 lines
Quoted 8 lines
Whether we maintain support for blktap2.5 in libxl is a matter for the Xen maintainers; but if xapi is ever going to start using libxl, it will certainly need to be able to do so.
(Dave / David, please correct me if I'm wrong.)
That said, there's no harm in disabling it on ARM to begin with, and enabling it once blktap3 works.
Yes, I would the code in Raisin to actually work :-)
The code should work just fine. When run on an ARM system without a blktap2 kernel module, libxl should detect that blktap2 is not available and not use it. If someone builds their own ARM kernel with blktap2 enabled, it will use it.
Quoted 5 lines
The only reason to disable this on ARM at the minute is because you *believe* that nobody will ever want to build the blktap2 kernel module on ARM, and so you want to avoid the build overhead and space overhead of compiling and using dead code. If that's your goal, you might get more mileage out of disabling stuff like xenmon or the paging code. :-)
No, that is not right. The reason I would like to disable blktap2 for ARM is that the userspace binaries and libraries won't compile on ARM at the moment. At least that was the case the last time I tried it. If you prove me wrong, I would be happy to have blktap2 on ARM too.
Quoted 11 lines
There's already an ARM Server SIG for CentOS; once that gets completed, Xen4CentOS project will probably also do an ARM server port, at which point it will almost certainly attempt to port over the blktap2 kernel modules.
Enabling blktap.git on ARM by default means a bit of extra compilation time and code in the resulting binary (though not much at all). Disabling it on ARM means that we'll have to enable it again once either
1) we get blktap3 working, or 2) someone shows an interest in using blktap2 on ARM.
Quoted 4 lines
Both costs are so low as to make it a bike-shed issue in my mind. I'd paint the bike shed "Enable it by arm on default", but repainting the shed when the time comes will be easy, so I don't care that much. I just want to make it clear that it *is* a bike-shed issue. :-)
Right, I am not worried about the build time.
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 10 lines · Stefano Stabellini
Quoted 5 lines
The only reason to disable this on ARM at the minute is because you *believe* that nobody will ever want to build the blktap2 kernel module on ARM, and so you want to avoid the build overhead and space overhead of compiling and using dead code. If that's your goal, you might get more mileage out of disabling stuff like xenmon or the paging code. :-)
No, that is not right. The reason I would like to disable blktap2 for ARM is that the userspace binaries and libraries won't compile on ARM at the moment. At least that was the case the last time I tried it. If you prove me wrong, I would be happy to have blktap2 on ARM too.
Right, I didn't realize that. That's certainly a good reason to disable it on ARM. :-)
-George
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
In reply to Stefano StabelliniQuoted 72 lines · Stefano Stabellini
Quoted 62 lines · George Dunlap
Quoted 33 lines · Stefano Stabellini
Quoted 32 lines · George Dunlap
Quoted 14 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 3 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Quoted 7 lines
Quoted 4 lines
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
So from my discussions w/ the XenServer guys, it seems that:
1. The "master" branch of the blktap.git repo contains support for *both* blktap3 and blktap2.5 (with a kernel module)
2. XenServer uses blktap3 for guest access, but still use the blktap2.5 w/ kernel module for dom0 access to guest disks, to avoid the possibility of hitting a scalability limit due to grant references.
Quoted 7 lines
Quoted 3 lines
So from raisin's perspective, the only difference between blktap2.5 and blktap3 is using the "master" branch rather than the "blktap2" branch of the repo.
That is not entirely true: compiling and installing a kernel module is quite different from userspace stuff, at least in terms of dependencies and installation paths.
The blktap.git repo doesn't compile a kernel module; it's only building userspace binaries and libraries. Libxl already knows how to detect the presence or absence of the kernel module and behave accordingly.
Quoted 10 lines
Quoted 8 lines
Whether we maintain support for blktap2.5 in libxl is a matter for the Xen maintainers; but if xapi is ever going to start using libxl, it will certainly need to be able to do so.
(Dave / David, please correct me if I'm wrong.)
That said, there's no harm in disabling it on ARM to begin with, and enabling it once blktap3 works.
Yes, I would the code in Raisin to actually work :-)
The code should work just fine. When run on an ARM system without a blktap2 kernel module, libxl should detect that blktap2 is not available and not use it. If someone builds their own ARM kernel with blktap2 enabled, it will use it.
Quoted 5 lines
The only reason to disable this on ARM at the minute is because you *believe* that nobody will ever want to build the blktap2 kernel module on ARM, and so you want to avoid the build overhead and space overhead of compiling and using dead code. If that's your goal, you might get more mileage out of disabling stuff like xenmon or the paging code. :-)
Quoted 4 lines
No, that is not right. The reason I would like to disable blktap2 for ARM is that the userspace binaries and libraries won't compile on ARM at the moment. At least that was the case the last time I tried it. If you prove me wrong, I would be happy to have blktap2 on ARM too.
FYI I’ve been sporadically building the blktap userspace on ARM and it seems to work, although last time I had to fix some format strings which assumed a 64-bit architecture. I think that patch got merged. I think my last build was in January.
The Mirage xen-arm-builder images currently contain a patched kernel with the blktap driver added as a patch, and a build of xapi + libxl + the blktap userspace tools. It’s only been lightly tested though :-)
Cheers,
Dave
Quoted 13 lines
Quoted 13 lines
There's already an ARM Server SIG for CentOS; once that gets completed, Xen4CentOS project will probably also do an ARM server port, at which point it will almost certainly attempt to port over the blktap2 kernel modules.
Enabling blktap.git on ARM by default means a bit of extra compilation time and code in the resulting binary (though not much at all). Disabling it on ARM means that we'll have to enable it again once either
1) we get blktap3 working, or 2) someone shows an interest in using blktap2 on ARM.
Quoted 6 lines
Quoted 4 lines
Both costs are so low as to make it a bike-shed issue in my mind. I'd paint the bike shed "Enable it by arm on default", but repainting the shed when the time comes will be easy, so I don't care that much. I just want to make it clear that it *is* a bike-shed issue. :-)
Right, I am not worried about the build time.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 75 lines · Dave Scott
Quoted 73 lines · Stefano Stabellini
Quoted 67 lines · George Dunlap
Quoted 33 lines · Stefano Stabellini
Quoted 32 lines · George Dunlap
Quoted 14 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Quoted 3 lines
Quoted 2 lines
Do we? There's no reason a blktap2 kernel module couldn't be built on ARM, is there?
Quoted 7 lines
Quoted 4 lines
Maybe not, but I am pretty sure that it doesn't work at the moment. I don't think that the userspace stuff even compiles on ARM. Eventually we might have blktap on ARM, but I don't want to enable stuff in Raisin that we know it does not work.
Especially if it is already to a greater or lesser extent deprecated (in favour of eventual blktap3) even on x86.
So from my discussions w/ the XenServer guys, it seems that:
1. The "master" branch of the blktap.git repo contains support for *both* blktap3 and blktap2.5 (with a kernel module)
2. XenServer uses blktap3 for guest access, but still use the blktap2.5 w/ kernel module for dom0 access to guest disks, to avoid the possibility of hitting a scalability limit due to grant references.
Quoted 7 lines
Quoted 3 lines
So from raisin's perspective, the only difference between blktap2.5 and blktap3 is using the "master" branch rather than the "blktap2" branch of the repo.
That is not entirely true: compiling and installing a kernel module is quite different from userspace stuff, at least in terms of dependencies and installation paths.
The blktap.git repo doesn't compile a kernel module; it's only building userspace binaries and libraries. Libxl already knows how to detect the presence or absence of the kernel module and behave accordingly.
Quoted 10 lines
Quoted 8 lines
Whether we maintain support for blktap2.5 in libxl is a matter for the Xen maintainers; but if xapi is ever going to start using libxl, it will certainly need to be able to do so.
(Dave / David, please correct me if I'm wrong.)
That said, there's no harm in disabling it on ARM to begin with, and enabling it once blktap3 works.
Yes, I would the code in Raisin to actually work :-)
The code should work just fine. When run on an ARM system without a blktap2 kernel module, libxl should detect that blktap2 is not available and not use it. If someone builds their own ARM kernel with blktap2 enabled, it will use it.
The only reason to disable this on ARM at the minute is because you *believe* that nobody will ever want to build the blktap2 kernel module on ARM, and so you want to avoid the build overhead and space overhead of compiling and using dead code. If that's your goal, you might get more mileage out of disabling stuff like xenmon or the paging code. :-)
Quoted 8 lines
Quoted 4 lines
No, that is not right. The reason I would like to disable blktap2 for ARM is that the userspace binaries and libraries won't compile on ARM at the moment. At least that was the case the last time I tried it. If you prove me wrong, I would be happy to have blktap2 on ARM too.
FYI I’ve been sporadically building the blktap userspace on ARM and it seems to work, although last time I had to fix some format strings which assumed a 64-bit architecture. I think that patch got merged. I think my last build was in January.
The Mirage xen-arm-builder images currently contain a patched kernel with the blktap driver added as a patch, and a build of xapi + libxl + the blktap userspace tools. It’s only been lightly tested though :-)
Quick followup, I’ve been building the tools with this patch:
https://github.com/xenserver/buildroot/blob/master/SOURCES/blktap-gntcpy.patch
This allows the build without the grant copy support.
Quoted 23 lines
Cheers,
DaveQuoted 19 lines
Quoted 13 lines
There's already an ARM Server SIG for CentOS; once that gets completed, Xen4CentOS project will probably also do an ARM server port, at which point it will almost certainly attempt to port over the blktap2 kernel modules.
Enabling blktap.git on ARM by default means a bit of extra compilation time and code in the resulting binary (though not much at all). Disabling it on ARM means that we'll have to enable it again once either
1) we get blktap3 working, or 2) someone shows an interest in using blktap2 on ARM.Quoted 4 lines
Both costs are so low as to make it a bike-shed issue in my mind. I'd paint the bike shed "Enable it by arm on default", but repainting the shed when the time comes will be easy, so I don't care that much. I just want to make it clear that it *is* a bike-shed issue. :-)
Right, I am not worried about the build time.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 9 lines · Dave Scott
Quoted 3 lines
FYI I’ve been sporadically building the blktap userspace on ARM and it seems to work, although last time I had to fix some format strings which assumed a 64-bit architecture. I think that patch got merged. I think my last build was in January.
The Mirage xen-arm-builder images currently contain a patched kernel with the blktap driver added as a patch, and a build of xapi + libxl + the blktap userspace tools. It’s only been lightly tested though :-)
Quick followup, I’ve been building the tools with this patch:
https://github.com/xenserver/buildroot/blob/master/SOURCES/blktap-gntcpy.patch
This allows the build without the grant copy support.
This is the master branch, then?
-George
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
Quoted 8 lines · George Dunlap
Quoted 4 lines · Dave Scott
Quoted 3 lines
FYI I’ve been sporadically building the blktap userspace on ARM and it seems to work, although last time I had to fix some format strings which assumed a 64-bit architecture. I think that patch got merged. I think my last build was in January.
The Mirage xen-arm-builder images currently contain a patched kernel with the blktap driver added as a patch, and a build of xapi + libxl + the blktap userspace tools. It’s only been lightly tested though :-)
Quoted 7 lines
Quoted 5 lines
Quick followup, I’ve been building the tools with this patch:
https://github.com/xenserver/buildroot/blob/master/SOURCES/blktap-gntcpy.patch
This allows the build without the grant copy support.
This is the master branch, then?
I’m using an rpm .spec file:
https://github.com/xenserver/buildroot/blob/master/SPECS/blktap.spec
which points to a tag. It’s currently v3.0.50 which looks like it’s the latest commit on the master branch:
https://github.com/xapi-project/blktap/commit/ee27d3f812ecc545d286b946d247eb782833b405
However I’ve not built this exact version on ARM yet. My old ARM binaries (from Feb 2015 rather than Jan) are tagged 0.9.3.fe874d-1 which appears to correspond to this version of the spec file:
Cheers,
Dave
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 8/8] raisin: RFC Add blktap2 as an external tree
In reply to Ian CampbellQuoted 10 lines · Ian Campbell
Quoted 2 lines · Stefano Stabellini
Quoted 2 lines
Quoted 2 lines
I think we need to disable the build on architectures other than x86, see grub for example
Eventually we might want to build our own grub on ARM in order to pick up Fu Wei's multiboot for arm64 patches, until they enter distros?
Or maybe Raisin on UEFI should be calling efibootmgr to register Xen directly with the BIOS, and creating a xen.cfg in /boot, i.e. the way it currently works even on x86.
Both approaches are certainly possible.
Quoted 3 lines · George Dunlap
Because we use "set -e", we can't use the "a && b" construct, as it will fail and stop the script.
Signed-off-by George Dunlap <[email protected]>
I am wondering whether we should ban both a && b and a || b from the code and just go with the more verbose but also harder to get wrong:
if [[ $VERBOSE -eq 1 ]]
then
echo calling "$component"_"$1"
fi
Reading the code and seeing a || b will tempt you into writing a && b.
Quoted 28 lines
lib/common-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)lib/common-functions.sh +2
-2@@ -232,9 +232,9 @@ function for_each_component () { fi if eval [[ ! -z \$"$capital"_REVISION ]] then - [[ $VERBOSE -eq 1 ]] && echo calling "$component"_"$1" + [[ $VERBOSE -eq 0 ]] || echo calling "$component"_"$1" "$component"_"$1" - [[ $VERBOSE -eq 1 ]] && echo "$component"_"$1" done + [[ $VERBOSE -eq 0 ]] || echo "$component"_"$1" done fi done }Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 8 lines · Stefano Stabellini
Quoted 3 lines · George Dunlap
Because we use "set -e", we can't use the "a && b" construct, as it will fail and stop the script.
Signed-off-by George Dunlap <[email protected]>I am wondering whether we should ban both a && b and a || b from the code and just go with the more verbose but also harder to get wrong:
Quoted 6 lines
if [[ $VERBOSE -eq 1 ]]
thenecho calling "$component"_"$1"fi
Reading the code and seeing a || b will tempt you into writing a && b.
That's a good point. :-) Do you want to go it or shall I resend?
-George
Quoted 9 lines · George Dunlap
Quoted 8 lines · Stefano Stabellini
Quoted 3 lines · George Dunlap
Because we use "set -e", we can't use the "a && b" construct, as it will fail and stop the script.
Signed-off-by George Dunlap <[email protected]>I am wondering whether we should ban both a && b and a || b from the code and just go with the more verbose but also harder to get wrong:
Quoted 8 lines
Quoted 6 lines
if [[ $VERBOSE -eq 1 ]]
thenecho calling "$component"_"$1"fi
Reading the code and seeing a || b will tempt you into writing a && b.
That's a good point. :-) Do you want to go it or shall I resend?
Given that you have a couple of other patches to resend, you might as well resend this one too.
Quoted 15 lines · Stefano Stabellini
Quoted 14 lines · George Dunlap
Quoted 13 lines · Stefano Stabellini
Quoted 3 lines · George Dunlap
Because we use "set -e", we can't use the "a && b" construct, as it will fail and stop the script.
Signed-off-by George Dunlap <[email protected]>I am wondering whether we should ban both a && b and a || b from the code and just go with the more verbose but also harder to get wrong:
if [[ $VERBOSE -eq 1 ]]
thenecho calling "$component"_"$1"fi
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Reading the code and seeing a || b will tempt you into writing a && b.
That's a good point. :-) Do you want to go it or shall I resend?
Given that you have a couple of other patches to resend, you might as well resend this one too.
I made the change and committed it.