From 62482b50db22c4aafb1ac42c2073fda7240817ba Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Wed, 25 Jan 2023 08:51:04 -0500 Subject: [PATCH] Add kinetic support Add 22.10 run-on base and add kinetic to metadata.yaml. Additional changes: * change CHARMCRAFT_* vars to CRAFT_* and add entrypoint * pin tox < 4.0.0 for now * switch to charmcraft pack * add standard bindep.txt * switch charm-tools to 2.8.4 to remove py310 ruamel requirement * use charmcraft_channel 2.0/stable Change-Id: I549e8382e4c079eb9eefec13f2a72e994e2b86f0 --- bindep.txt | 4 ++++ charmcraft.yaml | 15 ++++++++++----- osci.yaml | 1 + requirements.txt | 2 +- src/metadata.yaml | 1 + tox.ini | 5 +++-- 6 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 bindep.txt diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..17575d9 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,4 @@ +libffi-dev [platform:dpkg] +libpq-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] diff --git a/charmcraft.yaml b/charmcraft.yaml index 883fc9b..b5409f3 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,21 +2,23 @@ type: charm parts: charm: + charm-entrypoint: "hooks/install" build-packages: - tox - git - python3-dev + - libffi-dev override-build: | apt-get install ca-certificates -y tox -e build-reactive override-stage: | - echo "Copying charm to staging area: $CHARMCRAFT_STAGE" - NAME=$(ls $CHARMCRAFT_PART_BUILD/build/builds) - cp -r $CHARMCRAFT_PART_BUILD/build/builds/$NAME/* $CHARMCRAFT_STAGE/ + echo "Copying charm to staging area: $CRAFT_STAGE" + NAME=$(ls $CRAFT_PART_BUILD/build/builds) + cp -r $CRAFT_PART_BUILD/build/builds/$NAME/* $CRAFT_STAGE/ override-prime: | # For some reason, the normal priming chokes on the fact that there's a # hooks directory. - cp -r $CHARMCRAFT_STAGE/* . + cp -r $CRAFT_STAGE/* . bases: - build-on: @@ -30,4 +32,7 @@ bases: architectures: [amd64, s390x, ppc64el, arm64] - name: ubuntu channel: "22.04" - architectures: [amd64, s390x, ppc64el, arm64] \ No newline at end of file + architectures: [amd64, s390x, ppc64el, arm64] + - name: ubuntu + channel: "22.10" + architectures: [amd64, s390x, ppc64el, arm64] diff --git a/osci.yaml b/osci.yaml index e84a9f3..6fb7c56 100644 --- a/osci.yaml +++ b/osci.yaml @@ -8,3 +8,4 @@ needs_charm_build: true charm_build_name: ceph-fs build_type: charmcraft + charmcraft_channel: 2.0/stable diff --git a/requirements.txt b/requirements.txt index a68620f..c539e82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb # Build requirements cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. -charm-tools==2.8.3 +charm-tools==2.8.4 simplejson diff --git a/src/metadata.yaml b/src/metadata.yaml index 1bdda04..4408736 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -12,6 +12,7 @@ tags: series: - focal - jammy +- kinetic subordinate: false requires: ceph-mds: diff --git a/tox.ini b/tox.ini index 2d60b8a..9ae404d 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,7 @@ requires = pip < 20.3 virtualenv < 20.0 setuptools<50.0.0 + tox < 4.0.0 # NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci minversion = 3.18.0 @@ -50,7 +51,7 @@ basepython = python3 deps = -r{toxinidir}/build-requirements.txt commands = charmcraft clean - charmcraft -v build + charmcraft -v pack {toxinidir}/rename.sh [testenv:build-reactive] @@ -96,7 +97,7 @@ commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 deps = flake8==3.9.2 - charm-tools==2.8.3 + charm-tools==2.8.4 commands = flake8 {posargs} src unit_tests [testenv:func-target]