Elliott Mitchell
2020-Sep-14 05:31 UTC
[Pkg-xen-devel] [PATCH 3/3] debian/rules: Setup use of noOCAML profile
This adds support for use of the "noocaml" profile (https://wiki.debian.org/BuildProfileSpec). This allows disabling build of OCAML portions of Xen. As presently there is no separate oxenstored package, this makes due by using empty files to replace expected files. Presently the primary expected use is to allow cross-building of the Xen packages. At this time cross-building for OCAML is very broken. Hopefully it may work in future, but at this time it does not. Signed-off-by: Elliott Mitchell <ehem+debian at m5p.com> --- debian/control | 4 ++-- debian/rules | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 0ea70a0d33..753b7e009c 100644 --- a/debian/control +++ b/debian/control @@ -32,8 +32,8 @@ Build-Depends: zlib1g-dev, pandoc, markdown, - ocaml-native-compilers | ocaml-nox, - ocaml-findlib, + ocaml-native-compilers <!noocaml> | ocaml-nox <!noocaml>, + ocaml-findlib <!noocaml>, XS-Python-Version: current Homepage: https://xenproject.org/ Vcs-Browser: https://salsa.debian.org/xen-team/debian-xen diff --git a/debian/rules b/debian/rules index 7f7ae85803..e2a219d1f4 100755 --- a/debian/rules +++ b/debian/rules @@ -206,11 +206,15 @@ override_dh_auto_configure: # separately. override_dh_auto_build: $(MAKE) $(make_args_xen) xen - $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n OCAML_TOOLS=n case $(flavour) in \ amd64|i386) \ $(MAKE) $(make_args_xen) -C tools/firmware/xen-dir ;; \ esac + @# OCAML cross-compilation is currently non-functional + if [ -z "$(filter noocaml,$(DEB_BUILD_PROFILES))" ]; then \ + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n ; \ + fi touch debian/xen-tools-built.stamp # We keep the amount of fixup and messing about with debian/tmp/ @@ -220,7 +224,16 @@ override_dh_auto_build: override_dh_auto_install: $(TEMPLATED_FILES) $(MAKE) $(make_args_xen) DESTDIR=$t install-xen $(MAKE) $(make_args_tools) DESTDIR=$t \ - install-{tools,docs} CONFIG_PV_SHIM=n + install-{tools,docs} CONFIG_PV_SHIM=n OCAML_TOOLS=n + : + @# OCAML doesn't work when cross-building + if [ -z "$(filter noocaml,$(DEB_BUILD_PROFILES))" ]; then \ + $(MAKE) $(make_args_tools) DESTDIR=$t \ + install-{tools,docs} CONFIG_PV_SHIM=n ; \ + else \ + touch $t/etc/xen/oxenstored.conf ; \ + cp -l $t/usr/sbin/xl $t/usr/sbin/oxenstored ; \ + fi : @# shim install target needs to be run separately because we @# need to pass it the make_args_xen settings, in particular -- -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sigmsg at m5p.com PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
Hans van Kranenburg
2020-Sep-17 15:24 UTC
[Pkg-xen-devel] [PATCH 3/3] debian/rules: Setup use of noOCAML profile
Right, I found this one now, somewhere way back in the past of my mailbox, since the email has a date on Jul 18th. Again, please use git send-email instead, so that ordering, From address and dates get fixed. ;] Hans On 7/18/20 9:43 PM, Elliott Mitchell wrote:> This adds support for use of the "noocaml" profile > (https://wiki.debian.org/BuildProfileSpec). This allows disabling build > of OCAML portions of Xen. As presently there is no separate oxenstored > package, this makes due by using empty files to replace expected files. > > Presently the primary expected use is to allow cross-building of the Xen > packages. At this time cross-building for OCAML is very broken. > Hopefully it may work in future, but at this time it does not. > > Signed-off-by: Elliott Mitchell <ehem+debian at m5p.com> > --- > debian/control | 4 ++-- > debian/rules | 17 +++++++++++++++-- > 2 files changed, 17 insertions(+), 4 deletions(-) > > diff --git a/debian/control b/debian/control > index 0ea70a0d33..753b7e009c 100644 > --- a/debian/control > +++ b/debian/control > @@ -32,8 +32,8 @@ Build-Depends: > zlib1g-dev, > pandoc, > markdown, > - ocaml-native-compilers | ocaml-nox, > - ocaml-findlib, > + ocaml-native-compilers <!noocaml> | ocaml-nox <!noocaml>, > + ocaml-findlib <!noocaml>, > XS-Python-Version: current > Homepage: https://xenproject.org/ > Vcs-Browser: https://salsa.debian.org/xen-team/debian-xen > diff --git a/debian/rules b/debian/rules > index 7f7ae85803..e2a219d1f4 100755 > --- a/debian/rules > +++ b/debian/rules > @@ -206,11 +206,15 @@ override_dh_auto_configure: > # separately. > override_dh_auto_build: > $(MAKE) $(make_args_xen) xen > - $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n > + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n OCAML_TOOLS=n > case $(flavour) in \ > amd64|i386) \ > $(MAKE) $(make_args_xen) -C tools/firmware/xen-dir ;; \ > esac > + @# OCAML cross-compilation is currently non-functional > + if [ -z "$(filter noocaml,$(DEB_BUILD_PROFILES))" ]; then \ > + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n ; \ > + fi > touch debian/xen-tools-built.stamp > > # We keep the amount of fixup and messing about with debian/tmp/ > @@ -220,7 +224,16 @@ override_dh_auto_build: > override_dh_auto_install: $(TEMPLATED_FILES) > $(MAKE) $(make_args_xen) DESTDIR=$t install-xen > $(MAKE) $(make_args_tools) DESTDIR=$t \ > - install-{tools,docs} CONFIG_PV_SHIM=n > + install-{tools,docs} CONFIG_PV_SHIM=n OCAML_TOOLS=n > + : > + @# OCAML doesn't work when cross-building > + if [ -z "$(filter noocaml,$(DEB_BUILD_PROFILES))" ]; then \ > + $(MAKE) $(make_args_tools) DESTDIR=$t \ > + install-{tools,docs} CONFIG_PV_SHIM=n ; \ > + else \ > + touch $t/etc/xen/oxenstored.conf ; \ > + cp -l $t/usr/sbin/xl $t/usr/sbin/oxenstored ; \ > + fi > : > @# shim install target needs to be run separately because we > @# need to pass it the make_args_xen settings, in particular >