From 09c014915cb497ef2a4009f68da97be39c966d2f Mon Sep 17 00:00:00 2001 From: Dramelac Date: Tue, 13 Jun 2023 12:34:39 +0200 Subject: [PATCH 1/9] Fix local image recovery --- exegol/utils/DockerUtils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exegol/utils/DockerUtils.py b/exegol/utils/DockerUtils.py index 2c044085..a65f3fec 100644 --- a/exegol/utils/DockerUtils.py +++ b/exegol/utils/DockerUtils.py @@ -349,7 +349,9 @@ def __findLocalRecoveryImages(cls, include_untag: bool = False) -> List[Image]: id_list = set() for img in recovery_images: # Docker can keep track of 2 images maximum with RepoTag or RepoDigests, after it's hard to track origin without labels, so this recovery option is "best effort" - if len(img.attrs.get('RepoTags', [1])) > 0 or (not include_untag and len(img.attrs.get('RepoDigests', [1])) > 0) or img.id in id_list: + repo_tags = img.attrs.get('RepoTags') + repo_digest = img.attrs.get('RepoDigests') + if repo_tags is not None and len(repo_tags) > 0 or (not include_untag and repo_digest is not None and len(repo_digest) > 0) or img.id in id_list: # Skip image from other repo and image already found continue if img.labels.get('org.exegol.app', '') == "Exegol": From 6df384a5f17a57d8148577c31e44c6f60bf2f552 Mon Sep 17 00:00:00 2001 From: Dramelac Date: Tue, 13 Jun 2023 12:48:01 +0200 Subject: [PATCH 2/9] Update dev version --- exegol/config/ConstantConfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exegol/config/ConstantConfig.py b/exegol/config/ConstantConfig.py index 39b8939f..e2a64613 100644 --- a/exegol/config/ConstantConfig.py +++ b/exegol/config/ConstantConfig.py @@ -5,7 +5,7 @@ class ConstantConfig: """Constant parameters information""" # Exegol Version - version: str = "4.2.3" + version: str = "4.2.4b1" # Exegol documentation link documentation: str = "https://exegol.rtfd.io/" From fbd2c0c1197f155e1fb250c5a9a320c63b688aa0 Mon Sep 17 00:00:00 2001 From: Shutdown <40902872+ShutdownRepo@users.noreply.github.com> Date: Fri, 16 Jun 2023 10:08:55 +0200 Subject: [PATCH 3/9] Adding webui branch to PR pipeline --- exegol-docker-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exegol-docker-build b/exegol-docker-build index 4b8aa946..41ab9e1b 160000 --- a/exegol-docker-build +++ b/exegol-docker-build @@ -1 +1 @@ -Subproject commit 4b8aa9464301674e20195876f31ccc90284d97cc +Subproject commit 41ab9e1b4e57304bff7dbfb6c1a642a6e252b906 From a5310161ca913b0e537be382dffc8093a772649a Mon Sep 17 00:00:00 2001 From: Dramelac Date: Fri, 30 Jun 2023 15:41:36 +0200 Subject: [PATCH 4/9] Upgrade requirements --- requirements.txt | 8 ++++---- setup.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index c456d12a..bc41ff5f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -docker~=6.1.2 -requests>=2.30.0 -rich~=13.3.0 +docker~=6.1.3 +requests>=2.31.0 +rich~=13.4.2 GitPython~=3.1.29 PyYAML>=6.0 -argcomplete~=3.0.8 \ No newline at end of file +argcomplete~=3.1.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 79f5ccac..2ec07207 100644 --- a/setup.py +++ b/setup.py @@ -49,12 +49,12 @@ "Operating System :: OS Independent", ], install_requires=[ - 'docker~=6.1.2', - 'requests>=2.30.0', - 'rich~=13.3.0', + 'docker~=6.1.3', + 'requests>=2.31.0', + 'rich~=13.4.2', 'PyYAML', 'GitPython', - 'argcomplete~=3.0.8' + 'argcomplete~=3.1.1' ], packages=find_packages(exclude=["tests"]), include_package_data=True, From ac867cbf512775cfeaf54c1435efa495fabdfac1 Mon Sep 17 00:00:00 2001 From: spameier <40004508+spameier@users.noreply.github.com> Date: Mon, 10 Jul 2023 11:48:39 +0200 Subject: [PATCH 5/9] fix typo and improve wording in Git success message --- exegol/utils/GitUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exegol/utils/GitUtils.py b/exegol/utils/GitUtils.py index 34e0b0a0..4250a05f 100644 --- a/exegol/utils/GitUtils.py +++ b/exegol/utils/GitUtils.py @@ -126,7 +126,7 @@ def clone(self, repo_url: str, optimize_disk_space: bool = True) -> bool: progress.add_task(f"[bold red]Cloning {self.getName()} git repository", start=True) self.__gitRepo = Repo.clone_from(repo_url, str(self.__repo_path), multi_options=custom_options, progress=clone_update_progress) progress.remove_task(progress.tasks[0].id) - logger.success(f"The {self.getName()} git repository have been successfully clone!") + logger.success(f"The Git repository {self.getName()} was successfully cloned!") except GitCommandError as e: # GitPython user \n only error = GitUtils.formatStderr(e.stderr) From 306fd7f62b741140b1d9bf89b01da11f82b11e74 Mon Sep 17 00:00:00 2001 From: Dramelac Date: Thu, 13 Jul 2023 10:23:40 +0200 Subject: [PATCH 6/9] Fix offline update exception --- exegol/manager/UpdateManager.py | 3 ++- exegol/utils/GitUtils.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/exegol/manager/UpdateManager.py b/exegol/manager/UpdateManager.py index dd97688b..f802be36 100644 --- a/exegol/manager/UpdateManager.py +++ b/exegol/manager/UpdateManager.py @@ -202,7 +202,8 @@ def __checkUpdate(cls) -> bool: module = ExegolModules().getWrapperGit(fast_load=True) if module.isAvailable: isUpToDate = module.isUpToDate() - remote_version = str(module.get_latest_commit())[:8] + last_commit = module.get_latest_commit() + remote_version = "?" if last_commit is None else str(last_commit)[:8] current_version = str(module.get_current_commit())[:8] else: # If Exegol have not been installed from git clone. Auto-check update in this case is only available from mates release diff --git a/exegol/utils/GitUtils.py b/exegol/utils/GitUtils.py index 4250a05f..5a3af577 100644 --- a/exegol/utils/GitUtils.py +++ b/exegol/utils/GitUtils.py @@ -217,6 +217,7 @@ def isUpToDate(self, branch: Optional[str] = None) -> bool: logger.debug("NEW TAG flag detected") remote_commit = self.get_latest_commit() + assert remote_commit is not None # Check if remote_commit is an ancestor of the last local commit (check if there is local commit ahead) return self.__gitRepo.is_ancestor(remote_commit, current_commit) @@ -253,7 +254,9 @@ def get_latest_commit(self): assert self.isAvailable assert not ParametersManager().offline_mode if self.__fetchBranchInfo is None: - self.__fetch_update() + if not self.__fetch_update(): + logger.debug("The latest commit cannot be retrieved.") + return None assert self.__fetchBranchInfo is not None return self.__fetchBranchInfo.commit From 9fefe031e3ff59a93cb389a3dc2d50152d6d00e6 Mon Sep 17 00:00:00 2001 From: Dramelac Date: Thu, 13 Jul 2023 15:55:27 +0200 Subject: [PATCH 7/9] Check xhost before execution --- exegol/model/ExegolContainer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exegol/model/ExegolContainer.py b/exegol/model/ExegolContainer.py index 30d26f59..d2cfccf6 100644 --- a/exegol/model/ExegolContainer.py +++ b/exegol/model/ExegolContainer.py @@ -257,6 +257,10 @@ def __applyXhostACL(self): """ if self.config.isGUIEnable() and not self.__xhost_applied and not EnvInfo.isWindowsHost(): self.__xhost_applied = True # Can be applied only once per execution + if shutil.which("xhost") is None: + logger.error("The [green]xhost[/green] command is not available on your [bold]host[/bold]. " + "Exegol was unable to allow your container to access your graphical environment (or you don't have one).") + return if EnvInfo.isMacHost(): logger.debug(f"Adding xhost ACL to localhost") From 0f741a7f39c2315e668a4681b117b74521a22f69 Mon Sep 17 00:00:00 2001 From: Dramelac Date: Tue, 18 Jul 2023 12:34:43 +0200 Subject: [PATCH 8/9] Fix orbstack parsing --- exegol/config/EnvInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exegol/config/EnvInfo.py b/exegol/config/EnvInfo.py index 81a1d7a0..ff54b9fa 100644 --- a/exegol/config/EnvInfo.py +++ b/exegol/config/EnvInfo.py @@ -78,7 +78,7 @@ def initData(cls, docker_info): # Deduct a Windows Host from data cls.__is_docker_desktop = docker_os == "docker desktop" is_host_windows = cls.__is_docker_desktop and "microsoft" in docker_kernel - is_orbstack = "(containerized)" in docker_os and "orbstack" in docker_kernel + is_orbstack = (docker_os == "orbstack" or "(containerized)" in docker_os) and "orbstack" in docker_kernel if is_host_windows: # Check docker engine with Windows host if "wsl2" in docker_kernel: From 21277c599220fbd0cdc5a21e8c87b881d953e4a7 Mon Sep 17 00:00:00 2001 From: Dramelac Date: Tue, 18 Jul 2023 18:17:06 +0200 Subject: [PATCH 9/9] Ready for release --- exegol-docker-build | 2 +- exegol-resources | 2 +- exegol/config/ConstantConfig.py | 2 +- tests/test_exegol.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exegol-docker-build b/exegol-docker-build index 41ab9e1b..4b8aa946 160000 --- a/exegol-docker-build +++ b/exegol-docker-build @@ -1 +1 @@ -Subproject commit 41ab9e1b4e57304bff7dbfb6c1a642a6e252b906 +Subproject commit 4b8aa9464301674e20195876f31ccc90284d97cc diff --git a/exegol-resources b/exegol-resources index 63a30620..4c0dee13 160000 --- a/exegol-resources +++ b/exegol-resources @@ -1 +1 @@ -Subproject commit 63a306201c85662453622b66d7e3f69a9b1e2e7e +Subproject commit 4c0dee13ad16fa42947c1677dbd02a1f4456df90 diff --git a/exegol/config/ConstantConfig.py b/exegol/config/ConstantConfig.py index e2a64613..0c7b194a 100644 --- a/exegol/config/ConstantConfig.py +++ b/exegol/config/ConstantConfig.py @@ -5,7 +5,7 @@ class ConstantConfig: """Constant parameters information""" # Exegol Version - version: str = "4.2.4b1" + version: str = "4.2.4" # Exegol documentation link documentation: str = "https://exegol.rtfd.io/" diff --git a/tests/test_exegol.py b/tests/test_exegol.py index 5cadc990..b98740f9 100644 --- a/tests/test_exegol.py +++ b/tests/test_exegol.py @@ -2,4 +2,4 @@ def test_version(): - assert __version__ == '4.2.3' + assert __version__ == '4.2.4'