From b1256e12ce3fe6766eddb058f37bb9b3a28a4648 Mon Sep 17 00:00:00 2001 From: Lyes Saadi Date: Tue, 12 Sep 2023 18:36:25 +0200 Subject: [PATCH 01/17] blueprint-compiler: ExcludeArch s390x --- bottles.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bottles.spec b/bottles.spec index 6d29669..9de5be6 100644 --- a/bottles.spec +++ b/bottles.spec @@ -10,6 +10,10 @@ Version: %{tag} Release: %autorelease BuildArch: noarch +# blueprint-compiler does not work on s390x: +# https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 +ExcludeArch: s390x + %forgemeta License: GPL-3.0-or-later From a5315fda7c2570271c7d019caf5c2741f996ff54 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 9 Sep 2023 15:36:37 +0200 Subject: [PATCH 02/17] Update to 51.9 (RHBZ#2233358) - Update License: value - Update requirements - Close RHBZ#2229175 RHBZ#2227538 RHBZ#2224722 RHBZ#2222906 - Close RHBZ#2221500 --- .gitignore | 1 + bottles.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0ffe0dd..79e799b 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ /bottles-2022.6.14-brescia-1.tar.gz /bottles-2022.7.14-brescia-3.tar.gz /Bottles-51.6.tar.gz +/Bottles-51.9.tar.gz diff --git a/bottles.spec b/bottles.spec index 9de5be6..649ac37 100644 --- a/bottles.spec +++ b/bottles.spec @@ -2,11 +2,10 @@ %global gh_name Bottles %global forgeurl https://github.com/bottlesdevs/%{gh_name} -%global tag 51.6 Name: bottles Epoch: 1 -Version: %{tag} +Version: 51.9 Release: %autorelease BuildArch: noarch @@ -14,9 +13,13 @@ BuildArch: noarch # https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 ExcludeArch: s390x +%global tag %{version} %forgemeta -License: GPL-3.0-or-later +# The following two files are licensed as MIT: +# bottles/backend/models/vdict.py +# bottles/backend/utils/vdf.py +License: GPL-3.0-or-later AND MIT Summary: Easily manage Wine prefix in a new way URL: %{forgeurl} Source0: %{forgesource} @@ -52,6 +55,7 @@ Requires: xdpyinfo %dnl # needed by the display util Requires: python3-pathvalidate Requires: python3-fvs Requires: python3-vkbasalt-cli +Requires: ImageMagick %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2227538 %description Easily manage Wine prefix in a new way! (Run Windows software and games on diff --git a/sources b/sources index a7c74ce..7ec3991 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Bottles-51.6.tar.gz) = 0190744b3a99d791ffbd1b7a104565c2fd1f5aa110afe329897d4b29f0f5d669a6ec145468fea85e88b2f20bb2f7f075522760fd7ced94eea1afc0667780b288 +SHA512 (Bottles-51.9.tar.gz) = 81a77f0b02e2ea775bef5591d6be296372544a91fb92c4f39c3cab310887f88d8d9abd1d4b4854dcf8837bd2dc3f6d54c0693b55c60b60d6901e68dda82da1b4 From cc6bd153eaa4b29748732cbe810e6604826b5cec Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 30 Sep 2023 14:00:12 +0200 Subject: [PATCH 03/17] Use forge macros properly No need to define tag since we have releases on GitHub. That makes the `gh_name` macro obsolete. Also setup using forge magic. --- bottles.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bottles.spec b/bottles.spec index 649ac37..7e73bab 100644 --- a/bottles.spec +++ b/bottles.spec @@ -1,7 +1,6 @@ %global uuid pm.mirko.%{name} -%global gh_name Bottles -%global forgeurl https://github.com/bottlesdevs/%{gh_name} +%global forgeurl https://github.com/bottlesdevs/Bottles Name: bottles Epoch: 1 @@ -13,7 +12,6 @@ BuildArch: noarch # https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 ExcludeArch: s390x -%global tag %{version} %forgemeta # The following two files are licensed as MIT: @@ -93,7 +91,7 @@ Features: %prep -%autosetup -n %{gh_name}-%{version} +%forgeautosetup -p1 %build From bcaf1e0c2a9b118975b1f2b9523623003d9c1da6 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 30 Sep 2023 14:03:19 +0200 Subject: [PATCH 04/17] Drop obsolete macro --- bottles.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/bottles.spec b/bottles.spec index 7e73bab..94a6c85 100644 --- a/bottles.spec +++ b/bottles.spec @@ -1,5 +1,3 @@ -%global uuid pm.mirko.%{name} - %global forgeurl https://github.com/bottlesdevs/Bottles Name: bottles From 1e5c89290f7feff9469b7ac3fabd28043c292103 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 30 Sep 2023 14:06:48 +0200 Subject: [PATCH 05/17] Add python3-chardet (RHBZ#2240292) --- bottles.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/bottles.spec b/bottles.spec index 94a6c85..a4cf6f0 100644 --- a/bottles.spec +++ b/bottles.spec @@ -52,6 +52,7 @@ Requires: python3-pathvalidate Requires: python3-fvs Requires: python3-vkbasalt-cli Requires: ImageMagick %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2227538 +Requires: python3-chardet %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2240292 %description Easily manage Wine prefix in a new way! (Run Windows software and games on From a57f88836109d628f0ebf4680af3068f2240d794 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 30 Sep 2023 14:11:28 +0200 Subject: [PATCH 06/17] Add Packit config --- .packit.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..2e9373e --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,16 @@ +upstream_project_url: https://github.com/bottlesdevs/Bottles +upstream_package_name: Bottles +downstream_package_name: bottles + +copy_upstream_release_description: false + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-rawhide + - job: koji_build + + trigger: commit + dist_git_branches: + - fedora-all From 35ef5736a27fd9dc61e76e14394315d1dc75b3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Sun, 24 Dec 2023 09:31:16 +0100 Subject: [PATCH 07/17] Fix %forgesource MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nikola Forró --- bottles.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bottles.spec b/bottles.spec index a4cf6f0..1a1924d 100644 --- a/bottles.spec +++ b/bottles.spec @@ -10,6 +10,8 @@ BuildArch: noarch # https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 ExcludeArch: s390x +%global tag %{version} + %forgemeta # The following two files are licensed as MIT: From f54334cda44d4379ce0f2bc34886fbce7b146564 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 24 Dec 2023 12:24:56 +0100 Subject: [PATCH 08/17] Fix Packit configuration Bottles doesn't munge version ('v' prefix). Tell packit to use the plain version for computing the download URL. --- .packit.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.packit.yaml b/.packit.yaml index 2e9373e..7659433 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,5 +1,6 @@ upstream_project_url: https://github.com/bottlesdevs/Bottles upstream_package_name: Bottles +upstream_tag_template: "{version}" downstream_package_name: bottles copy_upstream_release_description: false From eb26f5222b417a1c81cdd8fdce9af4ccf5c9ca55 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 24 Dec 2023 12:52:33 +0100 Subject: [PATCH 09/17] Update to 51.10 (RHBZ#2255734) - Close RHBZ#2247856 RHBZ#2249922 RHBZ#2254894 --- .gitignore | 1 + bottles.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 79e799b..0c75929 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ /bottles-2022.7.14-brescia-3.tar.gz /Bottles-51.6.tar.gz /Bottles-51.9.tar.gz +/Bottles-51.10.tar.gz diff --git a/bottles.spec b/bottles.spec index 1a1924d..431d784 100644 --- a/bottles.spec +++ b/bottles.spec @@ -2,7 +2,7 @@ Name: bottles Epoch: 1 -Version: 51.9 +Version: 51.10 Release: %autorelease BuildArch: noarch diff --git a/sources b/sources index 7ec3991..e89f76e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Bottles-51.9.tar.gz) = 81a77f0b02e2ea775bef5591d6be296372544a91fb92c4f39c3cab310887f88d8d9abd1d4b4854dcf8837bd2dc3f6d54c0693b55c60b60d6901e68dda82da1b4 +SHA512 (Bottles-51.10.tar.gz) = a5d27f70d580cc115f797370437a41a0eeb7335e8278618415f7ba7268aae8102ba9ee8417723a731f677b7bf346773e5851f9021ff12bdec4305b436e589c24 From 0a7e2e162ce014a160f78ee8e8dddd269e8b3193 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 24 Dec 2023 13:04:55 +0100 Subject: [PATCH 10/17] Update meta info (summary, description) Also re-order spec file a little (pedantic). --- bottles.spec | 55 +++++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/bottles.spec b/bottles.spec index 431d784..c94071a 100644 --- a/bottles.spec +++ b/bottles.spec @@ -4,24 +4,23 @@ Name: bottles Epoch: 1 Version: 51.10 Release: %autorelease -BuildArch: noarch - -# blueprint-compiler does not work on s390x: -# https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 -ExcludeArch: s390x +Summary: Run Windows in a Bottle %global tag %{version} - %forgemeta # The following two files are licensed as MIT: # bottles/backend/models/vdict.py # bottles/backend/utils/vdf.py License: GPL-3.0-or-later AND MIT -Summary: Easily manage Wine prefix in a new way URL: %{forgeurl} Source0: %{forgesource} +BuildArch: noarch +# blueprint-compiler does not work on s390x: +# https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 +ExcludeArch: s390x + BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: meson @@ -57,39 +56,21 @@ Requires: ImageMagick %dnl # https://bugzilla.redhat.com/show_bug. Requires: python3-chardet %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2240292 %description -Easily manage Wine prefix in a new way! (Run Windows software and games on -Linux). +Bottles lets you run Windows software on Linux, such as applications +and games. It introduces a workflow that helps you organize by +categorizing each software to your liking. Bottles provides several +tools and integrations to help you manage and optimize your +applications. Features: - * Create bottles based on environments (a set of rule and dependencies for - better software compatibility) - * Access to a customizable environment for all your experiments - * Run every executable (.exe/.msi) in your bottles, using the context menu - in your file manager - * Integrated management and storage for executable file arguments - * Support for custom environment variables - * Simplified DLL overrides - * On-the-fly runner change for any Bottle - * Various optimizations for better gaming performance (esync, fsync, dxvk, - cache, shader compiler, offload .. and much more.) - * Tweak different wine prefix settings, without leaving Bottles - * Automated dxvk installation - * Automatic installation and management of Wine and Proton runners - * System for checking runner updates for the bottle and automatic repair in - case of breakage - * Integrated Dependencies installer with compatibility check based on a - community-driver repository - * Detection of installed programs - * Integrated Task manager for wine processes - * Easy access to ProtonDB and WineHQ for support - * Configurations update system across Bottles versions - * Backup bottles as configuration file or full archive - * Import backup archive - * Importer from Bottles v1 (and other wineprefix manager) - * Bottles versioning (experimental) - * .. and much more that you can find by installing Bottles! - +- Use pre-configured environments as a base +- Change runners for any bottle +- Various optimizations and options for gaming +- Repair in case software or bottle is broken +- Install various known dependencies +- Integrated task manager to manage and monitor processes +- Backup and restore %prep %forgeautosetup -p1 From ba3e6329c7e6cc07daa2f7c065194bf5c1d7ee70 Mon Sep 17 00:00:00 2001 From: Packit Date: Mon, 19 Feb 2024 08:01:08 +0000 Subject: [PATCH 11/17] [packit] 51.11 upstream release - Resolves rhbz#2264828 Upstream tag: 51.11 Upstream commit: 89abf684 --- .gitignore | 1 + README.packit | 3 +++ bottles.spec | 2 +- sources | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index 0c75929..b657454 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ /Bottles-51.6.tar.gz /Bottles-51.9.tar.gz /Bottles-51.10.tar.gz +/Bottles-51.11.tar.gz diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..f592284 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.91.0.post1.dev4+ge6fd4a25. diff --git a/bottles.spec b/bottles.spec index c94071a..529fec2 100644 --- a/bottles.spec +++ b/bottles.spec @@ -2,7 +2,7 @@ Name: bottles Epoch: 1 -Version: 51.10 +Version: 51.11 Release: %autorelease Summary: Run Windows in a Bottle diff --git a/sources b/sources index e89f76e..8baf231 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Bottles-51.10.tar.gz) = a5d27f70d580cc115f797370437a41a0eeb7335e8278618415f7ba7268aae8102ba9ee8417723a731f677b7bf346773e5851f9021ff12bdec4305b436e589c24 +SHA512 (Bottles-51.11.tar.gz) = 42c503a4910a8e6c408caecd723edf1405aa034558d61313937a69c7d5ffb20ba4675fc9022775491cbbe6ba4a35ffac508b4721f9c971c57cbcb888345d546b From 5886322d24d38c5d7c19f531fbaf4f83f1643155 Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 4 Mar 2024 20:36:49 +0100 Subject: [PATCH 12/17] Make sure Paths.bottles exists Fixes a FileNotFoundError when opening an executable directly in Bottles (RHBZ#2257180). Earlier reported in RHBZ#2249922, RHBZ#2252369 and RHBZ#2249986. --- bottles.spec | 2 ++ ensure_bottles_dir_exists.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ensure_bottles_dir_exists.patch diff --git a/bottles.spec b/bottles.spec index 529fec2..abc37bf 100644 --- a/bottles.spec +++ b/bottles.spec @@ -15,6 +15,8 @@ Summary: Run Windows in a Bottle License: GPL-3.0-or-later AND MIT URL: %{forgeurl} Source0: %{forgesource} +# Make sure bottles dir exists when opening executable directly +Patch: ensure_bottles_dir_exists.patch BuildArch: noarch # blueprint-compiler does not work on s390x: diff --git a/ensure_bottles_dir_exists.patch b/ensure_bottles_dir_exists.patch new file mode 100644 index 0000000..12ac255 --- /dev/null +++ b/ensure_bottles_dir_exists.patch @@ -0,0 +1,29 @@ +commit 7eed7bbfa5d1da924b4c4e0659f0bf86b0fd7d7b +Author: Sandro +Date: Mon Mar 4 20:28:49 2024 +0100 + + Make sure Paths.bottles exists + + When calling `bottles foo.exe` either from the command line or by + opening the executable from the file browser with Bottles, Bottles will + throw a FileNotFoundError if Paths.bottles does not exist. + + It seems check_app_dirs() is never called in that situation. + +diff --git a/bottles/backend/managers/manager.py b/bottles/backend/managers/manager.py +index 01b0039e..9d8ef000 100644 +--- a/bottles/backend/managers/manager.py ++++ b/bottles/backend/managers/manager.py +@@ -811,7 +811,11 @@ class Manager(metaclass=Singleton): + Check for local bottles and update the local_bottles list. + Will also mark the broken ones if the configuration file is missing + """ +- bottles = os.listdir(Paths.bottles) ++ try: ++ bottles = os.listdir(Paths.bottles) ++ except FileNotFoundError: ++ self.check_app_dirs() ++ bottles = [] + + # Empty local bottles + self.local_bottles = {} From 41b36c93a4f45d4c13d6ed7e2e4e7ddf91be5de5 Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 4 Mar 2024 21:51:22 +0100 Subject: [PATCH 13/17] Catch AttributeError in set_manager() Return empty list if AttributeError is raised (RHBZ#2260135). --- bottles.spec | 2 ++ catch_exception_in_set_manager.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 catch_exception_in_set_manager.patch diff --git a/bottles.spec b/bottles.spec index abc37bf..492310e 100644 --- a/bottles.spec +++ b/bottles.spec @@ -17,6 +17,8 @@ URL: %{forgeurl} Source0: %{forgesource} # Make sure bottles dir exists when opening executable directly Patch: ensure_bottles_dir_exists.patch +# Don't fail on AttributeError +Patch: catch_exception_in_set_manager.patch BuildArch: noarch # blueprint-compiler does not work on s390x: diff --git a/catch_exception_in_set_manager.patch b/catch_exception_in_set_manager.patch new file mode 100644 index 0000000..08c1794 --- /dev/null +++ b/catch_exception_in_set_manager.patch @@ -0,0 +1,28 @@ +commit 3e1db3c75fee5eedb2190e7dba71239e923affb7 +Author: Sandro +Date: Mon Mar 4 21:45:51 2024 +0100 + + Catch AttributeError in set_manager() + + Return empty list if AttributeError is raised. + +diff --git a/bottles/frontend/windows/main_window.py b/bottles/frontend/windows/main_window.py +index 5fb9a15c..cd26408b 100644 +--- a/bottles/frontend/windows/main_window.py ++++ b/bottles/frontend/windows/main_window.py +@@ -178,9 +178,12 @@ class MainWindow(Adw.ApplicationWindow): + def set_manager(result: Manager, error=None): + self.manager = result + +- tmp_runners = [ +- x for x in self.manager.runners_available if not x.startswith("sys-") +- ] ++ try: ++ tmp_runners = [ ++ x for x in self.manager.runners_available if not x.startswith("sys-") ++ ] ++ except AttributeError: ++ tmp_runners = [] + if len(tmp_runners) == 0: + self.show_onboard_view() + From f2e90931b083e03cf733f90b7c481bec5ce3a7d8 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 21 Apr 2024 15:01:53 +0200 Subject: [PATCH 14/17] Generate Python requirements - Fix RHBZ#2276256 Use upstream's `requirements.txt` to generate Python runtime requirements. Meson isn't helping us in keeping the list of requirements complete and up to date. With the added script this becomes semi automated. --- .gitignore | 65 ++------------------------------------------ bottles.spec | 33 ++++++++++++++-------- generate_requires.sh | 28 +++++++++++++++++++ 3 files changed, 51 insertions(+), 75 deletions(-) create mode 100755 generate_requires.sh diff --git a/.gitignore b/.gitignore index b657454..c1a85b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,63 +1,2 @@ -/bottles-2.0.9.7.tar.gz -/bottles-2.0.9.8.tar.gz -/bottles-2.0.9.9.tar.gz -/bottles-2.1.0.tar.gz -/bottles-2.1.0.2.tar.gz -/bottles-2.1.0.4.tar.gz -/bottles-2.1.0.5.tar.gz -/bottles-2.1.0.6.tar.gz -/bottles-2.1.0.7.tar.gz -/bottles-2.1.1.tar.gz -/bottles-2.1.2.tar.gz -/bottles-3.0.1.1.tar.gz -/bottles-3.0.2.tar.gz -/bottles-3.0.5.tar.gz -/bottles-3.0.6.tar.gz -/bottles-3.0.8.tar.gz -/bottles-3.0.9.tar.gz -/bottles-3.1.0.tar.gz -/bottles-3.1.1.tar.gz -/bottles-3.1.2.tar.gz -/bottles-3.1.3.tar.gz -/bottles-3.1.4.tar.gz -/bottles-3.1.5.tar.gz -/bottles-3.1.6.tar.gz -/bottles-3.1.7.tar.gz -/bottles-3.1.8.tar.gz -/bottles-3.1.9.tar.gz -/bottles-3.1.10.tar.gz -/bottles-3.1.11.tar.gz -/bottles-3.1.12.tar.gz -/bottles-3.1.13.tar.gz -/bottles-3.1.14.tar.gz -/bottles-3.1.15.tar.gz -/bottles-2021.7.3.tar.gz -/bottles-2021.7.14.tar.gz -/bottles-2021.7.28.tar.gz -/bottles-2021.8.14.tar.gz -/bottles-2021.8.28.tar.gz -/bottles-2021.9.14.tar.gz -/bottles-2021.9.28.tar.gz -/bottles-2021.10.14.tar.gz -/bottles-2021.10.28.tar.gz -/bottles-2021.11.14.tar.gz -/bottles-2021.11.28.tar.gz -/bottles-2021.12.14.tar.gz -/bottles-2021.12.28.tar.gz -/bottles-2022.1.14.tar.gz -/bottles-2022.1.28.tar.gz -/bottles-2022.2.14.tar.gz -/bottles-2022.2.28.tar.gz -/bottles-2022.3.14.tar.gz -/bottles-2022.3.28.tar.gz -/bottles-2022.4.14.tar.gz -/bottles-2022.4.28.tar.gz -/bottles-2022.5.2.tar.gz -/bottles-2022.5.14.tar.gz -/bottles-2022.5.28-trento-3.tar.gz -/bottles-2022.6.14-brescia-1.tar.gz -/bottles-2022.7.14-brescia-3.tar.gz -/Bottles-51.6.tar.gz -/Bottles-51.9.tar.gz -/Bottles-51.10.tar.gz -/Bottles-51.11.tar.gz +/Bottles*tar.gz +require*.txt diff --git a/bottles.spec b/bottles.spec index 492310e..b7dca6e 100644 --- a/bottles.spec +++ b/bottles.spec @@ -44,20 +44,29 @@ Requires: hicolor-icon-theme Requires: libadwaita >= 1.1.99 Requires: p7zip p7zip-plugins %dnl # needed by the dependencies manager Requires: patool -Requires: python3-gobject -Requires: python3-icoextract %dnl # icons support -Requires: python3-markdown -Requires: python3-patool -Requires: python3-pefile %dnl # icons support -Requires: python3-pyyaml -Requires: python3-requests %dnl # needed by the download manager -Requires: python3-urllib3 %dnl # needed by the download manager Requires: xdpyinfo %dnl # needed by the display util -Requires: python3-pathvalidate -Requires: python3-fvs -Requires: python3-vkbasalt-cli Requires: ImageMagick %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2227538 -Requires: python3-chardet %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2240292 + +# Use `generate_requires.sh` to generate Python runtime dependencies +# using upstream's `requirements.txt`, which is included in the tarball, +# but not used by Meson. +Requires: python3dist(pyyaml) +Requires: python3dist(pycurl) +Requires: python3dist(chardet) +Requires: python3dist(requests) +Requires: python3dist(markdown) +Requires: python3dist(icoextract) +Requires: python3dist(patool) +Requires: python3dist(pathvalidate) +Requires: python3dist(fvs) +Requires: python3dist(orjson) +Requires: python3dist(pycairo) +Requires: python3dist(pygobject) +Requires: python3dist(charset-normalizer) +Requires: python3dist(idna) +Requires: python3dist(urllib3) +Requires: python3dist(certifi) +Requires: python3dist(pefile) %description Bottles lets you run Windows software on Linux, such as applications diff --git a/generate_requires.sh b/generate_requires.sh new file mode 100755 index 0000000..99fe46e --- /dev/null +++ b/generate_requires.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +SPEC_FILE="bottles.spec" +REQUIREMENTS_FILE="requirements.txt" +REQUIREMENTS_SPEC="requires.txt" +# Remove file(s) from previous run +[ -f ${REQUIREMENTS_SPEC} ] && rm -vf ${REQUIREMENTS_SPEC} +[ -f ${REQUIREMENTS_FILE} ] && rm -vf ${REQUIREMENTS_FILE} +# Make sure sources are present +spectool -gSf ${SPEC_FILE} 2>/dev/null +TARBALL="$(rpmspec --parse bottles.spec 2>/dev/null | grep Source0 | sed -r 's/^.*(Bottles.*)/\1/')" +TAR_REQ_FILE="$(tar tzf ${TARBALL} | grep ${REQUIREMENTS_FILE})" +tar -x ${TAR_REQ_FILE} --strip-components=1 -zf ${TARBALL} + +# Remove version pinning from listed dependencies +# Require `requests`. The `use_chardet_on_py3` extra is not packaged in +# Fedora, but we have the required version of `chardet` present. +# Remove `wheel` from list - not a runtime requirement. +sed -r -i \ + -e 's/(^.*)==.*$/\1/g' \ + -e 's/(^requests)\[.*\]/\1/' \ + -e '/wheel/d' \ + requirements.txt + +# Transform requirements for inclusion in spec file +for REQ in $(grep -v '^#' ${REQUIREMENTS_FILE}); do + echo "Requires: python3dist(${REQ@L})" >> ${REQUIREMENTS_SPEC} +done From 307cb5d13662bbbf877e48b09716da32695110ac Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 21 Apr 2024 15:16:53 +0200 Subject: [PATCH 15/17] Properly line out sections Whitespace changes only. [skip changelog] --- bottles.spec | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/bottles.spec b/bottles.spec index b7dca6e..fed8a5d 100644 --- a/bottles.spec +++ b/bottles.spec @@ -20,32 +20,30 @@ Patch: ensure_bottles_dir_exists.patch # Don't fail on AttributeError Patch: catch_exception_in_set_manager.patch -BuildArch: noarch # blueprint-compiler does not work on s390x: # https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96 ExcludeArch: s390x +BuildArch: noarch -BuildRequires: desktop-file-utils -BuildRequires: libappstream-glib -BuildRequires: meson -BuildRequires: python3 +BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib +BuildRequires: meson +BuildRequires: python3 +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(libadwaita-1) >= 1.1.99 +BuildRequires: blueprint-compiler -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(gtk4) -BuildRequires: pkgconfig(libadwaita-1) >= 1.1.99 - -BuildRequires: blueprint-compiler - -Requires: cabextract -Requires: glibc(x86-32) %dnl # https://github.com/bottlesdevs/Bottles/issues/601#issuecomment-936772762 -Requires: gtk4 -Requires: gtksourceview5 -Requires: hicolor-icon-theme -Requires: libadwaita >= 1.1.99 -Requires: p7zip p7zip-plugins %dnl # needed by the dependencies manager -Requires: patool -Requires: xdpyinfo %dnl # needed by the display util -Requires: ImageMagick %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2227538 +Requires: cabextract +Requires: glibc(x86-32) %dnl # https://github.com/bottlesdevs/Bottles/issues/601#issuecomment-936772762 +Requires: gtk4 +Requires: gtksourceview5 +Requires: hicolor-icon-theme +Requires: libadwaita >= 1.1.99 +Requires: p7zip p7zip-plugins %dnl # needed by the dependencies manager +Requires: patool +Requires: xdpyinfo %dnl # needed by the display util +Requires: ImageMagick %dnl # https://bugzilla.redhat.com/show_bug.cgi?id=2227538 # Use `generate_requires.sh` to generate Python runtime dependencies # using upstream's `requirements.txt`, which is included in the tarball, From 3a764068e0e495b75a9bd381f04df3a15b9c1c8b Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 21 Apr 2024 15:23:47 +0200 Subject: [PATCH 16/17] Add .git-blame-ignore-revs Use with `git blame --ignore-revs-file` or set the git config option `blame.ignoreRevsFile`. [skip changelog] --- .git-blame-ignore-revs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..56e3a87 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Line out sections +53d45d3de51c20d134e62146a0ff82a3114cdeda From dc21781e07005607847cf2084c7a9bd25dfd04ba Mon Sep 17 00:00:00 2001 From: Sandro Date: Thu, 25 Apr 2024 18:31:09 +0200 Subject: [PATCH 17/17] Add vkbasalt-cli dependency (RHBZ#2277182) It was accidentally dropped when switching to generated dependencies in commit 60f51c6. --- bottles.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bottles.spec b/bottles.spec index fed8a5d..63c38f3 100644 --- a/bottles.spec +++ b/bottles.spec @@ -66,6 +66,9 @@ Requires: python3dist(urllib3) Requires: python3dist(certifi) Requires: python3dist(pefile) +# Requirements not listed in upstream's `requirements.txt` +Requires: python3dist(vkbasalt-cli) + %description Bottles lets you run Windows software on Linux, such as applications and games. It introduces a workflow that helps you organize by