From d398723cb2d0f20adba96a75aae2093b60848418 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Thu, 15 Dec 2022 14:22:01 +0000 Subject: [PATCH 1/2] opam: synchronize opam metadata with xs-opam Signed-off-by: Pau Ruiz Safont --- xapi-database.opam | 1 + xapi-datamodel.opam | 2 +- xapi-schema.opam | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xapi-database.opam b/xapi-database.opam index 038c13596c5..11167d354d3 100644 --- a/xapi-database.opam +++ b/xapi-database.opam @@ -19,6 +19,7 @@ depends: [ "rpclib" "base-threads" "uuid" + "xapi-datamodel" "xapi-schema" "xapi-stdext-encodings" "xapi-stdext-pervasives" diff --git a/xapi-datamodel.opam b/xapi-datamodel.opam index e64a1610b77..4fdf0775775 100644 --- a/xapi-datamodel.opam +++ b/xapi-datamodel.opam @@ -17,7 +17,7 @@ depends: [ "rpclib" "base-threads" "xapi-consts" - "xapi-database" + "xapi-schema" "xapi-stdext-date" "xapi-stdext-std" "xapi-stdext-unix" diff --git a/xapi-schema.opam b/xapi-schema.opam index c5847e2c1ff..60e1dc71ad9 100644 --- a/xapi-schema.opam +++ b/xapi-schema.opam @@ -13,6 +13,7 @@ depends: [ "dune" "ppx_sexp_conv" "sexpr" + "xapi-log" "xapi-stdext-encodings" ] synopsis: "The xapi toolstack daemon which implements the XenAPI" From 2b627d522ba8ddbf71e2e2238d32fccdfa7f76df Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Thu, 15 Dec 2022 15:03:30 +0000 Subject: [PATCH 2/2] xapi-storage{,-script}: explicitely use python2 instead of python Other distributions other than Xenserver are used for testing the installation of packages, and they have removed python as an alias for python2. Being explicit doesn't break compatibility on Xenserver, and allows us to keep newer versions of Ubuntu for testing in github Signed-off-by: Pau Ruiz Safont --- .../examples/datapath/block/Datapath.activate | 2 +- .../examples/datapath/block/Datapath.attach | 2 +- .../examples/datapath/block/Datapath.deactivate | 2 +- .../examples/datapath/block/Datapath.detach | 2 +- .../test/volume/org.xen.xapi.storage.dummy/plugin.py | 2 +- .../test/volume/org.xen.xapi.storage.dummy/sr.py | 2 +- .../test/volume/org.xen.xapi.storage.dummy/volume.py | 2 +- .../test/volume/org.xen.xapi.storage.dummyv5/plugin.py | 2 +- .../test/volume/org.xen.xapi.storage.dummyv5/sr.py | 2 +- .../test/volume/org.xen.xapi.storage.dummyv5/volume.py | 2 +- ocaml/xapi-storage/python/Makefile | 2 +- .../python/examples/datapath/loop+blkback/datapath.py | 2 +- .../python/examples/datapath/loop+blkback/plugin.py | 2 +- .../volume/org.xen.xapi.storage.simple-file/plugin.py | 2 +- .../examples/volume/org.xen.xapi.storage.simple-file/sr.py | 2 +- .../volume/org.xen.xapi.storage.simple-file/volume.py | 2 +- ocaml/xapi-storage/python/xapi/__init__.py | 2 +- ocaml/xapi-storage/python/xapi/storage/__init__.py | 2 +- ocaml/xapi-storage/python/xapi/storage/api/__init__.py | 2 +- ocaml/xapi-storage/python/xapi/storage/api/v5/__init__.py | 2 +- ocaml/xapi-storage/python/xapi/storage/common.py | 2 +- xapi-storage-script.opam | 4 ---- xapi-storage.opam | 4 ---- 23 files changed, 21 insertions(+), 29 deletions(-) diff --git a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.activate b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.activate index 61114b496bd..3115f233480 100755 --- a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.activate +++ b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.activate @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys sys.path.append("/home/vagrant/djs55/dbus-test/python") diff --git a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.attach b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.attach index d6a52b03d13..db6eb6de2eb 100755 --- a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.attach +++ b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.attach @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys sys.path.append("/home/vagrant/djs55/dbus-test/python") diff --git a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.deactivate b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.deactivate index 46a14b3ba14..48240856deb 100755 --- a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.deactivate +++ b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.deactivate @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys sys.path.append("/home/vagrant/djs55/dbus-test/python") diff --git a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.detach b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.detach index 41dd4a1b440..aac2e9d3773 100755 --- a/ocaml/xapi-storage-script/examples/datapath/block/Datapath.detach +++ b/ocaml/xapi-storage-script/examples/datapath/block/Datapath.detach @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys sys.path.append("/home/vagrant/djs55/dbus-test/python") diff --git a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/plugin.py b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/plugin.py index 066f1713099..08fb78407e0 100755 --- a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/plugin.py +++ b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/plugin.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (C) Citrix Systems, Inc. diff --git a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/sr.py b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/sr.py index 231fd7a4213..3cd7a211c8f 100755 --- a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/sr.py +++ b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/sr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (C) Citrix Systems, Inc. diff --git a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/volume.py b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/volume.py index 3b1901adec8..448ee6dcbc3 100755 --- a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/volume.py +++ b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummy/volume.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (C) Citrix Systems, Inc. diff --git a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/plugin.py b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/plugin.py index 73065a58b87..5816f0dd217 100755 --- a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/plugin.py +++ b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/plugin.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (C) Citrix Systems, Inc. diff --git a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/sr.py b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/sr.py index ee96afc7b0f..6100407e91d 100755 --- a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/sr.py +++ b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/sr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (C) Citrix Systems, Inc. diff --git a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/volume.py b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/volume.py index b235b9f6ebd..3994dcd7a08 100755 --- a/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/volume.py +++ b/ocaml/xapi-storage-script/test/volume/org.xen.xapi.storage.dummyv5/volume.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (C) Citrix Systems, Inc. diff --git a/ocaml/xapi-storage/python/Makefile b/ocaml/xapi-storage/python/Makefile index 94a164647ae..bc8eff9b851 100644 --- a/ocaml/xapi-storage/python/Makefile +++ b/ocaml/xapi-storage/python/Makefile @@ -1,5 +1,5 @@ PREFIX?=/usr -PYTHON?=python +PYTHON?=python2 .PHONY: build release clean install uninstall diff --git a/ocaml/xapi-storage/python/examples/datapath/loop+blkback/datapath.py b/ocaml/xapi-storage/python/examples/datapath/loop+blkback/datapath.py index 354e6c2055d..57ba8b5867c 100755 --- a/ocaml/xapi-storage/python/examples/datapath/loop+blkback/datapath.py +++ b/ocaml/xapi-storage/python/examples/datapath/loop+blkback/datapath.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (C) Citrix Systems Inc. # diff --git a/ocaml/xapi-storage/python/examples/datapath/loop+blkback/plugin.py b/ocaml/xapi-storage/python/examples/datapath/loop+blkback/plugin.py index 99abedd0e2d..9b909684ad1 100755 --- a/ocaml/xapi-storage/python/examples/datapath/loop+blkback/plugin.py +++ b/ocaml/xapi-storage/python/examples/datapath/loop+blkback/plugin.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (C) Citrix Systems Inc. # diff --git a/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/plugin.py b/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/plugin.py index 17a0cff86bb..72cf05b4e59 100755 --- a/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/plugin.py +++ b/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/plugin.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (C) Citrix Systems Inc. # diff --git a/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/sr.py b/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/sr.py index 10b8d726004..f2cf3b43d65 100755 --- a/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/sr.py +++ b/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/sr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (C) Citrix Systems Inc. # diff --git a/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/volume.py b/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/volume.py index fd9a72fa818..11535153461 100755 --- a/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/volume.py +++ b/ocaml/xapi-storage/python/examples/volume/org.xen.xapi.storage.simple-file/volume.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright (C) Citrix Systems Inc. # diff --git a/ocaml/xapi-storage/python/xapi/__init__.py b/ocaml/xapi-storage/python/xapi/__init__.py index e866b5573cf..2ab6b89ff1f 100644 --- a/ocaml/xapi-storage/python/xapi/__init__.py +++ b/ocaml/xapi-storage/python/xapi/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (c) 2013-2018, Citrix Inc. diff --git a/ocaml/xapi-storage/python/xapi/storage/__init__.py b/ocaml/xapi-storage/python/xapi/storage/__init__.py index 4265cc3e6c1..18ff5363796 100644 --- a/ocaml/xapi-storage/python/xapi/storage/__init__.py +++ b/ocaml/xapi-storage/python/xapi/storage/__init__.py @@ -1 +1 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 diff --git a/ocaml/xapi-storage/python/xapi/storage/api/__init__.py b/ocaml/xapi-storage/python/xapi/storage/api/__init__.py index 4265cc3e6c1..18ff5363796 100644 --- a/ocaml/xapi-storage/python/xapi/storage/api/__init__.py +++ b/ocaml/xapi-storage/python/xapi/storage/api/__init__.py @@ -1 +1 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 diff --git a/ocaml/xapi-storage/python/xapi/storage/api/v5/__init__.py b/ocaml/xapi-storage/python/xapi/storage/api/v5/__init__.py index 4265cc3e6c1..18ff5363796 100644 --- a/ocaml/xapi-storage/python/xapi/storage/api/v5/__init__.py +++ b/ocaml/xapi-storage/python/xapi/storage/api/v5/__init__.py @@ -1 +1 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 diff --git a/ocaml/xapi-storage/python/xapi/storage/common.py b/ocaml/xapi-storage/python/xapi/storage/common.py index 5faf16f70e2..a311446a416 100644 --- a/ocaml/xapi-storage/python/xapi/storage/common.py +++ b/ocaml/xapi-storage/python/xapi/storage/common.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from xapi.storage import log import xapi diff --git a/xapi-storage-script.opam b/xapi-storage-script.opam index c33111d0c7d..b5ea080daad 100644 --- a/xapi-storage-script.opam +++ b/xapi-storage-script.opam @@ -26,10 +26,6 @@ depends: [ "ppx_sexp_conv" "xapi-stdext-date" ] -# python 2.7 is not enough to ensure the availability of 'python' in these -depexts: [ - ["python"] {os-family = "debian" & with-test} -] synopsis: "A directory full of scripts can be a Xapi storage implementation" description: """ This daemon watches a directory for subdirectories, and when a subdir diff --git a/xapi-storage.opam b/xapi-storage.opam index 8e906f18451..91298140183 100644 --- a/xapi-storage.opam +++ b/xapi-storage.opam @@ -21,10 +21,6 @@ depends: [ "xmlm" "cmdliner" ] -# python 2.7 is not enough to ensure the availability of 'python' in these -depexts: [ - ["python"] {os-family = "debian"} -] synopsis: "Code and documentation generator for the Xapi storage interface" url { src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz"