From 181edeeb5734aa9a19d02946bb02b986ccb21840 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Sat, 6 Jan 2024 08:01:11 -0300 Subject: [PATCH 1/8] [gems.appimage] fix: regression on the database backend preventing long time installed AppImages to receive updates --- CHANGELOG.md | 5 +++++ bauh/gems/appimage/model.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af1dbf1a..27bb4bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [NEXT] +### Fixes +- AppImage + - regression on the database backend preventing long time installed AppImages to receive updates + ## [0.10.6] 2023-12-23 ### Features - new **verified** filter for the management table diff --git a/bauh/gems/appimage/model.py b/bauh/gems/appimage/model.py index 927300c2..80ca7669 100644 --- a/bauh/gems/appimage/model.py +++ b/bauh/gems/appimage/model.py @@ -54,7 +54,9 @@ def __init__(self, name: str = None, description: str = None, repository: str = icon_url=url_icon, license=license, description=description, installed=installed) self.source = source - self.repository = repository if repository else (github if github else repository) + + github_url = f"https://github.com/{github}" if github and not github.startswith("http://") else None + self.repository = repository if repository else (github_url if github_url else repository) self.categories = (categories.split(',') if isinstance(categories, str) else categories) if categories else None self.url_download = url_download self.icon_path = icon_path From d9bfc63b4e3c166c37aa54e1fb031f557f04fcfe Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Sat, 6 Jan 2024 08:02:51 -0300 Subject: [PATCH 2/8] bumping version to 0.10.7 --- bauh/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bauh/__init__.py b/bauh/__init__.py index ee5e95c4..c015854b 100644 --- a/bauh/__init__.py +++ b/bauh/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.10.6' +__version__ = '0.10.7' __app_name__ = 'bauh' import os From c44ab712ff2d890c7cc84e960a21a5ba9786e67c Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 8 Jan 2024 15:24:14 -0300 Subject: [PATCH 3/8] [view.qt] fix: 'name' filter not working for packages whose names contain the typed word --- CHANGELOG.md | 2 ++ bauh/view/qt/view_index.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27bb4bd8..05e47a2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixes - AppImage - regression on the database backend preventing long time installed AppImages to receive updates +- UI + - regression from `0.10.6`: "name" filter not working for packages whose names contain the typed words ## [0.10.6] 2023-12-23 ### Features diff --git a/bauh/view/qt/view_index.py b/bauh/view/qt/view_index.py index 0a64657a..46076f25 100644 --- a/bauh/view/qt/view_index.py +++ b/bauh/view/qt/view_index.py @@ -129,7 +129,7 @@ def query_packages(index: dict, filters: PackageFilters) -> Generator[PackageVie continue # checking if the package name contains the chars query - if query[5] in pkgv.model.name: + if query[6] in pkgv.model.name: yield pkgv yield_count += 1 yielded_pkgs[pkgv.model.get_type()].add(pkgv.model.id) From f2eba80e56ee30c632feafdb28e923ea5e8b845d Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 8 Jan 2024 18:10:37 -0300 Subject: [PATCH 4/8] [linux_dist.appimage] enhancement: using the latest Python standards to build and install bauh --- CHANGELOG.md | 3 +++ linux_dist/appimage/AppImageBuilder.yml | 19 +++++++++---------- linux_dist/appimage/Dockerfile | 3 ++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05e47a2f..38e5918e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - UI - regression from `0.10.6`: "name" filter not working for packages whose names contain the typed words +### Distribution +- AppImage: using the latest Python standards to build and install bauh (using `build` and `installer` packages) + ## [0.10.6] 2023-12-23 ### Features - new **verified** filter for the management table diff --git a/linux_dist/appimage/AppImageBuilder.yml b/linux_dist/appimage/AppImageBuilder.yml index f0b5ad5c..f9b360df 100755 --- a/linux_dist/appimage/AppImageBuilder.yml +++ b/linux_dist/appimage/AppImageBuilder.yml @@ -6,13 +6,13 @@ script: - wget https://github.com/vinifmor/bauh/archive/${BAUH_VERSION}.tar.gz || exit 1 - tar -xf ${BAUH_VERSION}.tar.gz || exit 1 - cd bauh-${BAUH_VERSION} || exit 1 - - rm pyproject.toml || exit 1 # not using the new project file definition for now - - BAUH_SETUP_NO_REQS=1 pip3 install . --prefix=/usr --root=../AppDir || exit 1 + - rm setup.cfg setup.py requirements.txt || exit 1 # removing the outdated installation files + - python3 -m build --wheel --no-isolation || exit 1 + - python3 -m installer --destdir=../AppDir --prefix=/usr dist/*.whl || exit 1 - test -e ../AppDir/usr/bin/bauh || exit 1 - cp bauh/view/resources/img/logo.svg ../AppDir/usr/share/icons/hicolor/scalable/apps/bauh.svg || exit 1 - cp bauh/desktop/bauh.desktop ../AppDir/usr/share/applications || exit 1 - AppDir: path: ./AppDir @@ -24,7 +24,6 @@ AppDir: exec: /usr/bin/python3 exec_args: "$APPDIR/usr/bin/bauh $@" - apt: arch: amd64 sources: @@ -42,12 +41,12 @@ AppDir: - sqlite3 - xdg-utils exclude: - - dpkg - - apt - - aptitude - - python3-pip - - python3-setuptools - - python3-distutils + - dpkg + - apt + - aptitude + - python3-pip + - python3-setuptools + - python3-distutils after_bundle: - pip3 install pyqt5==5.15.10 --prefix=/usr --root=AppDir || exit 1 diff --git a/linux_dist/appimage/Dockerfile b/linux_dist/appimage/Dockerfile index 8c77f71b..0555a5b6 100644 --- a/linux_dist/appimage/Dockerfile +++ b/linux_dist/appimage/Dockerfile @@ -4,7 +4,8 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y && \ apt-get upgrade -y && \ - apt-get install --no-install-recommends python3-pip python3-setuptools python3-wheel wget fuse binutils coreutils desktop-file-utils fakeroot patchelf squashfs-tools strace zsync libgdk-pixbuf2.0-dev gtk-update-icon-cache file -y && \ + apt-get install --no-install-recommends python3-pip python3-build python3-setuptools python3-wheel wget fuse binutils coreutils desktop-file-utils fakeroot patchelf squashfs-tools strace zsync libgdk-pixbuf2.0-dev gtk-update-icon-cache file -y && \ + pip3 install pip==23.3.2 setuptools==69.0.3 installer==0.7.0 && \ mkdir /build && cd /build && \ wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v0.9.2/appimage-builder-0.9.2-35e3eab-x86_64.AppImage -O appimage-builder && \ wget https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -O appimage-tool && \ From 00c3c34d15e126e661ab9b3494c0d61b31dda145 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 8 Jan 2024 18:15:34 -0300 Subject: [PATCH 5/8] [view.qt] fix: name filter not working for camel case --- bauh/view/qt/view_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bauh/view/qt/view_index.py b/bauh/view/qt/view_index.py index 46076f25..00041c5e 100644 --- a/bauh/view/qt/view_index.py +++ b/bauh/view/qt/view_index.py @@ -76,7 +76,7 @@ def generate_queries(filters: PackageFilters) -> Generator[Tuple[Optional[Union[ chars_query = None if filters.name: - chars_query = filters.name.lower() + chars_query = filters.name.strip().lower() installed_queries = (1,) if filters.only_installed else (1, 0) apps_queries = (1,) if filters.only_apps else (1, 0) @@ -129,7 +129,7 @@ def query_packages(index: dict, filters: PackageFilters) -> Generator[PackageVie continue # checking if the package name contains the chars query - if query[6] in pkgv.model.name: + if query[6] in pkgv.model.name.lower(): yield pkgv yield_count += 1 yielded_pkgs[pkgv.model.get_type()].add(pkgv.model.id) From 1c2d6e7e26bf7336c885baebee5663dbb039fc8b Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 10 Jan 2024 10:33:32 -0300 Subject: [PATCH 6/8] MANIFEST.in: adding more exclusions --- CHANGELOG.md | 1 + MANIFEST.in | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38e5918e..c87c377c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Distribution - AppImage: using the latest Python standards to build and install bauh (using `build` and `installer` packages) +- PyPI: adding more exclusions to unneeded files ## [0.10.6] 2023-12-23 ### Features diff --git a/MANIFEST.in b/MANIFEST.in index 73d75a30..86e7f976 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,3 +5,6 @@ recursive-include bauh/view/resources * recursive-exclude bauh/view/resources *.orig recursive-include bauh/gems/*/resources * recursive-exclude bauh/gems/*/resources *.orig +recursive-exclude linux_dist * +recursive-exclude venv * +recursive-exclude .venv * From 8170a52f97fa21c727892bbcde9ac1d101edc189 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 10 Jan 2024 16:55:54 -0300 Subject: [PATCH 7/8] CHANGELOG.md: updating release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c87c377c..5a6e4a5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [NEXT] +## [0.10.7] 2024-01-10 ### Fixes - AppImage - regression on the database backend preventing long time installed AppImages to receive updates From e2686e3c54b9f814b7cadbba6161b4017da487e8 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 10 Jan 2024 16:58:11 -0300 Subject: [PATCH 8/8] [gems.appimage] fix: github URL checking --- bauh/gems/appimage/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bauh/gems/appimage/model.py b/bauh/gems/appimage/model.py index 80ca7669..4f4f22bb 100644 --- a/bauh/gems/appimage/model.py +++ b/bauh/gems/appimage/model.py @@ -55,7 +55,7 @@ def __init__(self, name: str = None, description: str = None, repository: str = installed=installed) self.source = source - github_url = f"https://github.com/{github}" if github and not github.startswith("http://") else None + github_url = f"https://github.com/{github}" if github and not github.startswith("https://") else None self.repository = repository if repository else (github_url if github_url else repository) self.categories = (categories.split(',') if isinstance(categories, str) else categories) if categories else None self.url_download = url_download