From 1702b438a4b12209ac19c77d2022bd759917ed36 Mon Sep 17 00:00:00 2001 From: Tim Sandquist Date: Wed, 4 Jan 2023 08:54:59 -0600 Subject: [PATCH 1/3] dynamips: update to 0.2.23. Enable cross-compiling when binfmt support is available. --- srcpkgs/dynamips/template | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/srcpkgs/dynamips/template b/srcpkgs/dynamips/template index 6c0d7fd74cea6..5f7c20572e025 100644 --- a/srcpkgs/dynamips/template +++ b/srcpkgs/dynamips/template @@ -2,8 +2,8 @@ pkgname=dynamips version=0.2.23 revision=1 -archs="i686* x86_64*" build_style=cmake +build_helper=qemu makedepends="elfutils-devel libpcap-devel" depends="iouyap" short_desc="Hardware emulation for Cisco IOS capable devices" @@ -13,8 +13,10 @@ homepage="https://github.com/GNS3/dynamips" distfiles="https://github.com/GNS3/${pkgname}/archive/v${version}.tar.gz" checksum=503bbb52c03f91900ea8dbe8bd0b804b76e2e28d0b7242624e0d3c52dda441a1 -# Dynamips does processor instruction translation. This is already -# painfully slow on powerful x86 hardware and is unlikely to work -# reliably on arm processors. -# -# So restrict to x86_64* and i686* +# cross compile does not currently work without binfmt +# so `nocross` is used in environments like Github Actions +_BINFMT_PATH=/proc/sys/fs/binfmt_misc/qemu-${XBPS_TARGET_QEMU_MACHINE}-static + +if ! grep -q enabled ${_BINFMT_PATH} 2>/dev/null; then + nocross="binfmt support not enabled" +fi From 3bdd1892592b2ebf0dcd33656abd2e9b4316afc9 Mon Sep 17 00:00:00 2001 From: Tim Sandquist Date: Wed, 4 Jan 2023 08:55:16 -0600 Subject: [PATCH 2/3] gns3-server: update to 2.2.44.1. --- srcpkgs/gns3-server/patches/importlib.patch | 65 --------------------- srcpkgs/gns3-server/template | 23 ++++---- 2 files changed, 10 insertions(+), 78 deletions(-) delete mode 100644 srcpkgs/gns3-server/patches/importlib.patch diff --git a/srcpkgs/gns3-server/patches/importlib.patch b/srcpkgs/gns3-server/patches/importlib.patch deleted file mode 100644 index c3dbd98bc7661..0000000000000 --- a/srcpkgs/gns3-server/patches/importlib.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py -index 5c5236b9..971e3452 100644 ---- a/gns3server/controller/__init__.py -+++ b/gns3server/controller/__init__.py -@@ -22,7 +22,11 @@ import uuid - import socket - import shutil - import aiohttp --import importlib_resources -+ -+try: -+ from importlib import resources as importlib_resources -+except ImportError: -+ import importlib_resources - - from ..config import Config - from .project import Project -diff --git a/gns3server/controller/appliance_manager.py b/gns3server/controller/appliance_manager.py -index d15fc69b..41b73104 100644 ---- a/gns3server/controller/appliance_manager.py -+++ b/gns3server/controller/appliance_manager.py -@@ -21,9 +21,13 @@ import json - import uuid - import asyncio - import aiohttp --import importlib_resources - import shutil - -+try: -+ from importlib import resources as importlib_resources -+except ImportError: -+ import importlib_resources -+ - from .appliance import Appliance - from ..config import Config - from ..utils.asyncio import locking -diff --git a/gns3server/utils/get_resource.py b/gns3server/utils/get_resource.py -index b4b599bd..f4054cd3 100644 ---- a/gns3server/utils/get_resource.py -+++ b/gns3server/utils/get_resource.py -@@ -19,7 +19,11 @@ import atexit - import logging - import os - import sys --import importlib_resources -+ -+try: -+ from importlib import resources as importlib_resources -+except ImportError: -+ import importlib_resources - - from contextlib import ExitStack - resource_manager = ExitStack() -diff --git a/requirements.txt b/requirements.txt -index 53f1200d..5eda661b 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -11,6 +11,6 @@ psutil==5.9.2 - async-timeout>=4.0.2,<4.1 - distro>=1.7.0 - py-cpuinfo>=9.0.0,<10.0 --importlib-resources>=1.3 -+importlib-resources>=1.3; python_version < '3.9' - setuptools>=60.8.1; python_version >= '3.7' - setuptools==59.6.0; python_version < '3.7' # v59.6.0 is the last version to support Python 3.6 diff --git a/srcpkgs/gns3-server/template b/srcpkgs/gns3-server/template index d1bd0eed1ce45..739cc72746fb8 100644 --- a/srcpkgs/gns3-server/template +++ b/srcpkgs/gns3-server/template @@ -1,12 +1,13 @@ # Template file for 'gns3-server' pkgname=gns3-server -version=2.2.35 -revision=2 +version=2.2.44.1 +revision=1 build_style=python3-module hostmakedepends="python3-setuptools" +makedepends="busybox-static" # Pulls distro busybox static to embed depends="python3-setuptools python3-jsonschema python3-aiohttp python3-aiohttp-cors - python3-yarl python3-Jinja2 python3-psutil python3-aiofiles - python3-py-cpuinfo python3-distro python3-async-timeout dynamips" + python3-yarl python3-Jinja2 python3-psutil python3-aiofiles python3-platformdirs + python3-py-cpuinfo python3-distro python3-async-timeout dynamips ubridge" checkdepends="${depends} python3-pytest python3-flake8 python3-pytest-timeout python3-pytest-aiohttp" short_desc="Graphical Network Simulator 3 - Server" maintainer="Tim Sandquist " @@ -14,17 +15,13 @@ license="GPL-3.0-or-later" homepage="https://gns3.com" changelog="https://raw.githubusercontent.com/GNS3/gns3-server/master/CHANGELOG" distfiles="https://github.com/GNS3/gns3-server/archive/v${version}.tar.gz" -checksum=2c20ddc968a24fd8a77c272071d35304bac0706266a3f9e643658555e634c489 - -# The source archive contains statically linked artifacts for x86_64 -# glibc, since this is the only architecture supported by upstream, we -# mirror that requirement here. The artifacts in questions are the C -# modules that are used to drive additional virtualization backends -# for gns3. For more information, see this ticket: -# https://github.com/GNS3/gns3-server/issues/970 -archs="x86_64" +checksum=96a85d73db795282b3b732e1b6a5f592145c4a1cf93fa23f966dbe34d5d91a67 post_patch() { # comment out requirements since versions are usually out of sync with Void packages vsed -e 's|^|#|' -i requirements.txt + # pre-populate docker resource directory with static busybox binary + if [ "$CROSS_BUILD" ]; then + cp ${XBPS_CROSS_BASE}/bin/busybox.static gns3server/compute/docker/resources/bin/busybox + fi } From 0651dcf77ff7c2cdf2a64d832b7d347f0a33c340 Mon Sep 17 00:00:00 2001 From: Tim Sandquist Date: Wed, 4 Jan 2023 08:55:23 -0600 Subject: [PATCH 3/3] gns3-gui: update to 2.2.44.1. --- srcpkgs/gns3-gui/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/gns3-gui/template b/srcpkgs/gns3-gui/template index 9397fbff2644e..2717396384cca 100644 --- a/srcpkgs/gns3-gui/template +++ b/srcpkgs/gns3-gui/template @@ -1,7 +1,7 @@ # Template file for 'gns3-gui' pkgname=gns3-gui -version=2.2.35 -revision=2 +version=2.2.44.1 +revision=1 build_style=python3-module hostmakedepends="python3-setuptools" depends="python3-setuptools python3-psutil python3-jsonschema @@ -14,7 +14,7 @@ license="GPL-3.0-or-later" homepage="https://gns3.com" changelog="https://raw.githubusercontent.com/GNS3/gns3-gui/master/CHANGELOG" distfiles="https://github.com/GNS3/${pkgname}/archive/v${version}.tar.gz" -checksum=5dee30a6be10a4463d16c3cec516bf81717fc6f37f4f53386347d98de9a1f43b +checksum=d2eec509d9ec11dfc2f61b485853162471a41fd95489c0aa9b5b4d84f801a85e post_patch() {