1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Merge branch '2.2' into 3.0

# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/crash_report.py
#	gns3server/run.py
#	gns3server/static/web-ui/index.html
#	gns3server/utils/images.py
#	gns3server/version.py
#	requirements.txt
#	scripts/update-bundled-web-ui.sh
This commit is contained in:
grossmj 2023-08-10 15:00:22 +10:00
commit fe90d2b146
19 changed files with 310 additions and 34 deletions

View File

@ -1,5 +1,16 @@
# Change Log # Change Log
## 2.2.42 09/08/2023
* Bundle web-ui v2.2.42
* Handle API version key in VirtualBox 7. Fixes #2266
* Enable system certificate store for SSL connections
* Use DEFAULT_BUFFER_SIZE for md5sum
* Fix version check when installing appliances. Ref https://github.com/GNS3/gns3-gui/issues/3486
* Allow connection to ws console over IPv6. Fixes https://github.com/GNS3/gns3-web-ui/issues/1400
* Support for Python 3.12
* Remove import urllib3 and let sentry_sdk import and patch it. Fixes https://github.com/GNS3/gns3-gui/issues/3498
## 2.2.41 12/07/2023 ## 2.2.41 12/07/2023
* Bundle web-ui v2.2.41 * Bundle web-ui v2.2.41

View File

@ -24,6 +24,22 @@
"kvm": "allow" "kvm": "allow"
}, },
"images": [ "images": [
{
"filename": "AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2",
"version": "9.2",
"md5sum": "c5bc76e8c95ac9f810a3482c80a54cc7",
"filesize": 563347456,
"download_url": "https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/",
"direct_download_url": "https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2"
},
{
"filename": "AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2",
"version": "8.8",
"md5sum": "3958c5fc25770ef63cf97aa5d93f0a0b",
"filesize": 565444608,
"download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/",
"direct_download_url": "https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2"
},
{ {
"filename": "AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2", "filename": "AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2",
"version": "8.7", "version": "8.7",
@ -42,6 +58,20 @@
} }
], ],
"versions": [ "versions": [
{
"name": "9.2",
"images": {
"hda_disk_image": "AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2",
"cdrom_image": "almalinux-cloud-init-data.iso"
}
},
{
"name": "8.8",
"images": {
"hda_disk_image": "AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2",
"cdrom_image": "almalinux-cloud-init-data.iso"
}
},
{ {
"name": "8.7", "name": "8.7",
"images": { "images": {

View File

@ -26,6 +26,22 @@
"options": "-nographic" "options": "-nographic"
}, },
"images": [ "images": [
{
"filename": "CentOS-Stream-GenericCloud-9-20230727.1.x86_64.qcow2",
"version": "Stream-9 (20230727.1)",
"md5sum": "b66b7e4951cb5491ae44d5616d56b7cf",
"filesize": 1128764416,
"download_url": "https://cloud.centos.org/centos/9-stream/x86_64/images",
"direct_download_url": "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20230727.1.x86_64.qcow2"
},
{
"filename": "CentOS-Stream-GenericCloud-8-20230710.0.x86_64.qcow2",
"version": "Stream-8 (20230710.0)",
"md5sum": "83e02ce98c29753c86fb7be7d802aa75",
"filesize": 1676164096,
"download_url": "https://cloud.centos.org/centos/8-stream/x86_64/images",
"direct_download_url": "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20230710.0.x86_64.qcow2"
},
{ {
"filename": "CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2", "filename": "CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2",
"version": "8.4 (2105)", "version": "8.4 (2105)",
@ -60,6 +76,20 @@
} }
], ],
"versions": [ "versions": [
{
"name": "Stream-9 (20230727.1)",
"images": {
"hda_disk_image": "CentOS-Stream-GenericCloud-9-20230727.1.x86_64.qcow2",
"cdrom_image": "centos-cloud-init-data.iso"
}
},
{
"name": "Stream-8 (20230710.0)",
"images": {
"hda_disk_image": "CentOS-Stream-GenericCloud-8-20230710.0.x86_64.qcow2",
"cdrom_image": "centos-cloud-init-data.iso"
}
},
{ {
"name": "8.4 (2105)", "name": "8.4 (2105)",
"images": { "images": {

View File

@ -24,12 +24,12 @@
}, },
"images": [ "images": [
{ {
"filename": "debian-12-genericcloud-amd64-20230612-1409.qcow2", "filename": "debian-12-genericcloud-amd64-20230723-1450.qcow2",
"version": "12.0", "version": "12.1",
"md5sum": "524cf33a1284d6e3363bd4d843756386", "md5sum": "6d1efcaa206de01eeeb590d773421c5c",
"filesize": 280166400, "filesize": 280166400,
"download_url": "https://cloud.debian.org/images/cloud/bookworm/", "download_url": "https://cloud.debian.org/images/cloud/bookworm/",
"direct_download_url": "https://cloud.debian.org/images/cloud/bookworm/20230612-1409/debian-12-genericcloud-amd64-20230612-1409.qcow2" "direct_download_url": "https://cloud.debian.org/images/cloud/bookworm/20230723-1450/debian-12-genericcloud-amd64-20230723-1450.qcow2"
}, },
{ {
"filename": "debian-11-genericcloud-amd64-20230601-1398.qcow2", "filename": "debian-11-genericcloud-amd64-20230601-1398.qcow2",
@ -58,9 +58,9 @@
], ],
"versions": [ "versions": [
{ {
"name": "12.0", "name": "12.1",
"images": { "images": {
"hda_disk_image": "debian-12-genericcloud-amd64-20230612-1409.qcow2", "hda_disk_image": "debian-12-genericcloud-amd64-20230723-1450.qcow2",
"cdrom_image": "debian-cloud-init-data.iso" "cdrom_image": "debian-cloud-init-data.iso"
} }
}, },

View File

@ -0,0 +1,17 @@
{
"appliance_id": "f59a5cf6-baaa-45a6-9685-989a2c3f3f4a",
"name": "endhost",
"category": "guest",
"description": "General purpose alpine-based endhost",
"vendor_name": "endhost",
"vendor_url": "https://www.alpinelinux.org",
"product_name": "endhost",
"registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"docker": {
"adapters": 1,
"image": "gns3/endhost:latest"
}
}

View File

@ -27,6 +27,13 @@
"options": "-nographic" "options": "-nographic"
}, },
"images": [ "images": [
{
"filename": "VOSSGNS3.8.10.1.0.qcow2",
"version": "v8.10.1.0",
"md5sum": "d8f09f5a9759882be84ad7e4be575ed3",
"filesize": 433258496,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.8.10.1.0.qcow2"
},
{ {
"filename": "VOSSGNS3.8.8.0.0.qcow2", "filename": "VOSSGNS3.8.8.0.0.qcow2",
"version": "v8.8.0.0", "version": "v8.8.0.0",
@ -85,6 +92,13 @@
} }
], ],
"versions": [ "versions": [
{
"name": "v8.10.1.0",
"images":
{
"hda_disk_image": "VOSSGNS3.8.10.1.0.qcow2"
}
},
{ {
"name": "v8.8.0.0", "name": "v8.8.0.0",
"images": { "images": {

View File

@ -26,6 +26,30 @@
"options": "-nographic" "options": "-nographic"
}, },
"images": [ "images": [
{
"filename": "Fedora-Cloud-Base-38-1.6.x86_64.qcow2",
"version": "38-1.6",
"md5sum": "53ddfe7b28666d5ddc55e93ff06abad2",
"filesize": 497287168,
"download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images",
"direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2"
},
{
"filename": "Fedora-Cloud-Base-37-1.7.x86_64.qcow2",
"version": "37-1.7",
"md5sum": "36f7b464b6ab46ad97c001b539495e90",
"filesize": 492830720,
"download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images",
"direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.qcow2"
},
{
"filename": "Fedora-Cloud-Base-36-1.5.x86_64.qcow2",
"version": "36-1.5",
"md5sum": "7f7cdad25b77f232078bf454c39529d3",
"filesize": 448266240,
"download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/36/Cloud/x86_64/images",
"direct_download_url": "https://download.fedoraproject.org/pub/fedora/linux/releases/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-1.5.x86_64.qcow2"
},
{ {
"filename": "Fedora-Cloud-Base-35-1.2.x86_64.qcow2", "filename": "Fedora-Cloud-Base-35-1.2.x86_64.qcow2",
"version": "35-1.2", "version": "35-1.2",
@ -44,6 +68,27 @@
} }
], ],
"versions": [ "versions": [
{
"name": "38-1.6",
"images": {
"hda_disk_image": "Fedora-Cloud-Base-38-1.6.x86_64.qcow2",
"cdrom_image": "fedora-cloud-init-data.iso"
}
},
{
"name": "37-1.7",
"images": {
"hda_disk_image": "Fedora-Cloud-Base-37-1.7.x86_64.qcow2",
"cdrom_image": "fedora-cloud-init-data.iso"
}
},
{
"name": "36-1.5",
"images": {
"hda_disk_image": "Fedora-Cloud-Base-36-1.5.x86_64.qcow2",
"cdrom_image": "fedora-cloud-init-data.iso"
}
},
{ {
"name": "35-1.2", "name": "35-1.2",
"images": { "images": {

View File

@ -0,0 +1,18 @@
{
"appliance_id": "79df483d-8cc9-48de-85ea-e6cb45b93e2a",
"name": "haproxy",
"category": "guest",
"description": "haproxy alpine container",
"vendor_name": "haproxy",
"vendor_url": "https://www.haproxy.org",
"product_name": "haproxy",
"registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Modify /etc/haproxy/haproxy.cfg to suit your needs.",
"docker": {
"adapters": 1,
"image": "gns3/haproxy:latest"
}
}

View File

@ -21,7 +21,7 @@
"arch": "x86_64", "arch": "x86_64",
"console_type": "telnet", "console_type": "telnet",
"kvm": "require", "kvm": "require",
"options": "-machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host" "options": "-machine type=pc,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host"
}, },
"images": [ "images": [
{ {

View File

@ -23,7 +23,7 @@
"arch": "x86_64", "arch": "x86_64",
"console_type": "telnet", "console_type": "telnet",
"kvm": "require", "kvm": "require",
"options": "-machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host" "options": "-machine type=pc,accel=kvm -serial mon:stdio -nographic -nodefaults -rtc base=utc -cpu host"
}, },
"images": [ "images": [
{ {

View File

@ -13,7 +13,7 @@
"availability": "service-contract", "availability": "service-contract",
"maintainer": "Neyder Achahuanco", "maintainer": "Neyder Achahuanco",
"maintainer_email": "neyder@neyder.net", "maintainer_email": "neyder@neyder.net",
"usage": "You should download Red Hat Enterprise Linux KVM Guest Image from https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.5/x86_64/product-software attach/customize cloud-init.iso and start.\nusername: cloud-user\npassword: redhat", "usage": "You should download Red Hat Enterprise Linux KVM Guest Image from https://access.redhat.com/downloads/content/479/ver=/rhel---9/9.2/x86_64/product-software attach/customize cloud-init.iso and start.\nusername: cloud-user\npassword: redhat",
"qemu": { "qemu": {
"adapter_type": "virtio-net-pci", "adapter_type": "virtio-net-pci",
"adapters": 1, "adapters": 1,
@ -26,6 +26,48 @@
"options": "-nographic" "options": "-nographic"
}, },
"images": [ "images": [
{
"filename": "rhel-9.2-x86_64-kvm.qcow2",
"version": "9.2",
"md5sum": "f33845298b387dbcfbf162c6b4e3f8c8",
"filesize": 819265536,
"download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/9.2/x86_64/product-software"
},
{
"filename": "rhel-baseos-9.1-x86_64-kvm.qcow2",
"version": "9.1",
"md5sum": "622de743da83bcec1ad2959ecaedb8f4",
"filesize": 753401856,
"download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/9.1/x86_64/product-software"
},
{
"filename": "rhel-baseos-9.0-x86_64-kvm.qcow2",
"version": "9.0",
"md5sum": "4a41497d354fe99a4abf55f1ed73edcb",
"filesize": 696582144,
"download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/9.0/x86_64/product-software"
},
{
"filename": "rhel-8.8-x86_64-kvm.qcow2",
"version": "8.8",
"md5sum": "bf22af816ba6abd846bbb0c9ecf7bce1",
"filesize": 926810112,
"download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.8/x86_64/product-software"
},
{
"filename": "rhel-8.7-x86_64-kvm.qcow2",
"version": "8.7",
"md5sum": "ab71a2c4cc276441bf999f531e064507",
"filesize": 858128384,
"download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.7/x86_64/product-software"
},
{
"filename": "rhel-8.6-x86_64-kvm.qcow2",
"version": "8.6",
"md5sum": "19501666f46df6b5472db1254e86a339",
"filesize": 832438272,
"download_url": "https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.6/x86_64/product-software"
},
{ {
"filename": "rhel-8.5-x86_64-kvm.qcow2", "filename": "rhel-8.5-x86_64-kvm.qcow2",
"version": "8.5", "version": "8.5",
@ -70,6 +112,48 @@
} }
], ],
"versions": [ "versions": [
{
"name": "9.2",
"images": {
"hda_disk_image": "rhel-9.2-x86_64-kvm.qcow2",
"cdrom_image": "rhel-cloud-init.iso"
}
},
{
"name": "9.1",
"images": {
"hda_disk_image": "rhel-baseos-9.1-x86_64-kvm.qcow2",
"cdrom_image": "rhel-cloud-init.iso"
}
},
{
"name": "9.0",
"images": {
"hda_disk_image": "rhel-baseos-9.0-x86_64-kvm.qcow2",
"cdrom_image": "rhel-cloud-init.iso"
}
},
{
"name": "8.8",
"images": {
"hda_disk_image": "rhel-8.8-x86_64-kvm.qcow2",
"cdrom_image": "rhel-cloud-init.iso"
}
},
{
"name": "8.7",
"images": {
"hda_disk_image": "rhel-8.7-x86_64-kvm.qcow2",
"cdrom_image": "rhel-cloud-init.iso"
}
},
{
"name": "8.6",
"images": {
"hda_disk_image": "rhel-8.6-x86_64-kvm.qcow2",
"cdrom_image": "rhel-cloud-init.iso"
}
},
{ {
"name": "8.5", "name": "8.5",
"images": { "images": {

View File

@ -26,9 +26,17 @@
"options": "-nographic" "options": "-nographic"
}, },
"images": [ "images": [
{
"filename": "ubuntu-23.04-server-cloudimg-arm64.img",
"version": "Ubuntu 23.04 (Lunar Lobster)",
"md5sum": "35fa3b31b65717af6f0520a769aac8c0",
"filesize": 786432000,
"download_url": "https://cloud-images.ubuntu.com/releases/23.04/release/",
"direct_download_url": "https://cloud-images.ubuntu.com/releases/23.04/release/ubuntu-23.04-server-cloudimg-arm64.img"
},
{ {
"filename": "ubuntu-22.04-server-cloudimg-amd64.img", "filename": "ubuntu-22.04-server-cloudimg-amd64.img",
"version": "22.04 (LTS)", "version": "Ubuntu 22.04 LTS (Jammy Jellyfish)",
"md5sum": "3ce0b84f9592482fb645e8253b979827", "md5sum": "3ce0b84f9592482fb645e8253b979827",
"filesize": 686096384, "filesize": 686096384,
"download_url": "https://cloud-images.ubuntu.com/releases/jammy/release", "download_url": "https://cloud-images.ubuntu.com/releases/jammy/release",
@ -36,7 +44,7 @@
}, },
{ {
"filename": "ubuntu-20.04-server-cloudimg-amd64.img", "filename": "ubuntu-20.04-server-cloudimg-amd64.img",
"version": "20.04 (LTS)", "version": "Ubuntu 20.04 LTS (Focal Fossa)",
"md5sum": "044bc979b2238192ee3edb44e2bb6405", "md5sum": "044bc979b2238192ee3edb44e2bb6405",
"filesize": 552337408, "filesize": 552337408,
"download_url": "https://cloud-images.ubuntu.com/releases/focal/release-20210119.1/", "download_url": "https://cloud-images.ubuntu.com/releases/focal/release-20210119.1/",
@ -44,7 +52,7 @@
}, },
{ {
"filename": "ubuntu-18.04-server-cloudimg-amd64.img", "filename": "ubuntu-18.04-server-cloudimg-amd64.img",
"version": "18.04 (LTS)", "version": "Ubuntu 18.04 LTS (Bionic Beaver)",
"md5sum": "f4134e7fa16d7fa766c7467cbe25c949", "md5sum": "f4134e7fa16d7fa766c7467cbe25c949",
"filesize": 336134144, "filesize": 336134144,
"download_url": "https://cloud-images.ubuntu.com/releases/18.04/release-20180426.2/", "download_url": "https://cloud-images.ubuntu.com/releases/18.04/release-20180426.2/",
@ -61,21 +69,28 @@
], ],
"versions": [ "versions": [
{ {
"name": "22.04 (LTS)", "name": "Ubuntu 23.04 (Lunar Lobster)",
"images": {
"hda_disk_image": "ubuntu-23.04-server-cloudimg-arm64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso"
}
},
{
"name": "Ubuntu 22.04 LTS (Jammy Jellyfish)",
"images": { "images": {
"hda_disk_image": "ubuntu-22.04-server-cloudimg-amd64.img", "hda_disk_image": "ubuntu-22.04-server-cloudimg-amd64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso" "cdrom_image": "ubuntu-cloud-init-data.iso"
} }
}, },
{ {
"name": "20.04 (LTS)", "name": "Ubuntu 20.04 LTS (Focal Fossa)",
"images": { "images": {
"hda_disk_image": "ubuntu-20.04-server-cloudimg-amd64.img", "hda_disk_image": "ubuntu-20.04-server-cloudimg-amd64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso" "cdrom_image": "ubuntu-cloud-init-data.iso"
} }
}, },
{ {
"name": "18.04 (LTS)", "name": "Ubuntu 18.04 LTS (Bionic Beaver)",
"images": { "images": {
"hda_disk_image": "ubuntu-18.04-server-cloudimg-amd64.img", "hda_disk_image": "ubuntu-18.04-server-cloudimg-amd64.img",
"cdrom_image": "ubuntu-cloud-init-data.iso" "cdrom_image": "ubuntu-cloud-init-data.iso"

View File

@ -27,6 +27,13 @@
"options": "-usbdevice tablet" "options": "-usbdevice tablet"
}, },
"images": [ "images": [
{
"filename": "SERVER_EVAL_x64FRE_en-us.iso",
"version": "2022",
"md5sum": "e7908933449613edc97e1b11180429d1",
"filesize": 5044094976,
"download_url": "https://www.microsoft.com/en-gb/evalcenter/evaluate-windows-server-2022"
},
{ {
"filename": "Win2k16_14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO", "filename": "Win2k16_14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"version": "2016", "version": "2016",
@ -51,6 +58,13 @@
} }
], ],
"versions": [ "versions": [
{
"name": "2022",
"images": {
"hda_disk_image": "empty100G.qcow2",
"cdrom_image": "SERVER_EVAL_x64FRE_en-us.iso"
}
},
{ {
"name": "2016", "name": "2016",
"images": { "images": {

View File

@ -77,6 +77,9 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
except ValueError: except ValueError:
continue continue
self._system_properties[name.strip()] = value.strip() self._system_properties[name.strip()] = value.strip()
if "API Version" in self._system_properties:
# API version is not consistent between VirtualBox versions, the key is named "API Version" in VirtualBox 7
self._system_properties["API version"] = self._system_properties.pop("API Version")
async def _check_requirements(self): async def _check_requirements(self):
""" """

View File

@ -32,7 +32,6 @@ import distro
from .version import __version__, __version_info__ from .version import __version__, __version_info__
from .config import Config from .config import Config
from .utils.get_resource import get_resource
import logging import logging
@ -72,25 +71,13 @@ class CrashReport:
sentry_uncaught.disabled = True sentry_uncaught.disabled = True
if SENTRY_SDK_AVAILABLE: if SENTRY_SDK_AVAILABLE:
cacert = None
if hasattr(sys, "frozen"):
cacert_resource = get_resource("cacert.pem")
if cacert_resource is not None and os.path.isfile(cacert_resource):
cacert = cacert_resource
else:
log.error(f"The SSL certificate bundle file '{cacert_resource}' could not be found")
# Don't send log records as events. # Don't send log records as events.
sentry_logging = LoggingIntegration(level=logging.INFO, event_level=None) sentry_logging = LoggingIntegration(level=logging.INFO, event_level=None)
try: try:
sentry_sdk.init( sentry_sdk.init(dsn=CrashReport.DSN,
dsn=CrashReport.DSN, release=__version__,
release=__version__, default_integrations=False,
ca_certs=cacert, integrations=[sentry_logging])
default_integrations=False,
integrations=[sentry_logging],
)
except Exception as e: except Exception as e:
log.error("Crash report could not be sent: {}".format(e)) log.error("Crash report could not be sent: {}".format(e))
return return

File diff suppressed because one or more lines are too long

View File

@ -23,11 +23,13 @@ import shutil
from typing import List, AsyncGenerator from typing import List, AsyncGenerator
from ..config import Config from ..config import Config
from . import force_unix_path from . import force_unix_path
from io import DEFAULT_BUFFER_SIZE
import gns3server.db.models as models import gns3server.db.models as models
from gns3server.db.repositories.images import ImagesRepository from gns3server.db.repositories.images import ImagesRepository
from gns3server.utils.asyncio import wait_run_in_executor from gns3server.utils.asyncio import wait_run_in_executor
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -253,7 +255,7 @@ def md5sum(path, working_dir=None, stopped_event=None, cache_to_md5file=True):
if stopped_event is not None and stopped_event.is_set(): if stopped_event is not None and stopped_event.is_set():
log.error(f"MD5 sum calculation of `{path}` has stopped due to cancellation") log.error(f"MD5 sum calculation of `{path}` has stopped due to cancellation")
return return
buf = f.read(1024) buf = f.read(DEFAULT_BUFFER_SIZE)
if not buf: if not buf:
break break
m.update(buf) m.update(buf)

View File

@ -6,7 +6,7 @@ aiohttp>=3.8.5,<3.9
async-timeout==4.0.2 async-timeout==4.0.2
aiofiles==23.1.0 aiofiles==23.1.0
Jinja2>=3.1.2,<3.2 Jinja2>=3.1.2,<3.2
sentry-sdk==1.28.1,<1.29 sentry-sdk==1.29.2,<1.30
psutil==5.9.5 psutil==5.9.5
distro>=1.8.0 distro>=1.8.0
py-cpuinfo==9.0.0 py-cpuinfo==9.0.0

View File

@ -98,3 +98,8 @@ yarn ng build --source-map=false --build-optimizer=false --configuration=product
cp -R $REPO_DIR/dist/* "$GNS3SERVER_DIR/gns3server/static/web-ui/" cp -R $REPO_DIR/dist/* "$GNS3SERVER_DIR/gns3server/static/web-ui/"
cd "$GNS3SERVER_DIR" cd "$GNS3SERVER_DIR"
git add gns3server/static/web-ui/*
if [[ -n "$TAG" ]]
then
git commit -m "Bundle web-ui ${TAG}"
fi