Compare commits

..

4 Commits

Author SHA1 Message Date
bb2aac145d Bump version to 0.9.71 2023-09-01 00:36:38 -04:00
a7c1b91f60 [Bookworm] Correct install of manage scripts 2023-09-01 00:36:24 -04:00
ec6d3351b2 [Bookworm] Correct Celery invocation 2023-09-01 00:30:01 -04:00
22faaa9bbc [Bookworm] Correct Flask DB migration process
Move the old manage script to _legacy, and add a new _flask version with
modern Flask tooling. Decide which one to call via pvc-api-db-migrate
using /etc/debian_version call.
2023-09-01 00:29:17 -04:00
11 changed files with 58 additions and 12 deletions

View File

@ -1 +1 @@
0.9.70
0.9.71

View File

@ -1,5 +1,9 @@
## PVC Changelog
###### [v0.9.71](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.71)
* [API] Adds API support for Debian Bookworm
###### [v0.9.70](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.70)
* [Node Daemon] Fixes several compatibility issues for Debian 12 "Bookworm"

View File

@ -11,5 +11,16 @@ if [[ ! -f ${PVC_CONFIG_FILE} ]]; then
fi
pushd /usr/share/pvc
./pvcapid-manage.py db upgrade
case "$( cat /etc/debian_version )" in
10.*|11.*)
# Debian 10 & 11
./pvcapid-manage_legacy.py db upgrade
;;
*)
# Debian 12+
flask --app ./pvcapid-manage_flask.py db upgrade
;;
esac
popd

View File

@ -0,0 +1,29 @@
#!/usr/bin/env python3
# pvcapid-manage_flask.py - PVC Database management tasks (via Flask CLI)
# Part of the Parallel Virtual Cluster (PVC) system
#
# Copyright (C) 2018-2022 Joshua M. Boniface <joshua@boniface.me>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###############################################################################
from pvcapid.flaskapi import app, db
from pvcapid.models import * # noqa F401,F403
from flask_migrate import Migrate
migrate = Migrate(app, db)
# Call flask --app /usr/share/pvc/pvcapid-manage_flask.py db upgrade

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
# manage.py - PVC Database management tasks
# pvcapid-manage_legacy.py - PVC Database management tasks (Legacy)
# Part of the Parallel Virtual Cluster (PVC) system
#
# Copyright (C) 2018-2022 Joshua M. Boniface <joshua@boniface.me>

View File

@ -27,12 +27,8 @@ case "$( cat /etc/debian_version )" in
10.*)
CELERY_ARGS="worker --app pvcapid.flaskapi.celery --concurrency 1 --loglevel INFO"
;;
11.*)
CELERY_ARGS="--app pvcapid.flaskapi.celery worker --concurrency 1 --loglevel INFO"
;;
*)
echo "Invalid Debian version found!"
exit 1
CELERY_ARGS="--app pvcapid.flaskapi.celery worker --concurrency 1 --loglevel INFO"
;;
esac

View File

@ -27,7 +27,7 @@ from ssl import SSLContext, TLSVersion
from distutils.util import strtobool as dustrtobool
# Daemon version
version = "0.9.70"
version = "0.9.71"
# API version
API_VERSION = 1.0

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="pvc",
version="0.9.70",
version="0.9.71",
packages=["pvc.cli", "pvc.lib"],
install_requires=[
"Click",

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
pvc (0.9.71-0) unstable; urgency=high
* [API] Adds API support for Debian Bookworm
-- Joshua M. Boniface <joshua@boniface.me> Fri, 01 Sep 2023 00:30:42 -0400
pvc (0.9.70-0) unstable; urgency=high
* [Node Daemon] Fixes several compatibility issues for Debian 12 "Bookworm"

View File

@ -1,5 +1,5 @@
api-daemon/pvcapid.py usr/share/pvc
api-daemon/pvcapid-manage.py usr/share/pvc
api-daemon/pvcapid-manage*.py usr/share/pvc
api-daemon/pvc-api-db-upgrade usr/share/pvc
api-daemon/pvcapid.sample.yaml etc/pvc
api-daemon/pvcapid usr/share/pvc

View File

@ -49,7 +49,7 @@ import re
import json
# Daemon version
version = "0.9.70"
version = "0.9.71"
##########################################################