Skip to content

bottles-unwrapped: 51.17 -> 51.21#403938

Merged
Aleksanaa merged 2 commits intoNixOS:masterfrom
XBagon:update-bottles
May 17, 2025
Merged

bottles-unwrapped: 51.17 -> 51.21#403938
Aleksanaa merged 2 commits intoNixOS:masterfrom
XBagon:update-bottles

Conversation

@XBagon
Copy link
Contributor

@XBagon XBagon commented May 3, 2025

Diff: bottlesdevs/Bottles@refs/tags/51.17...refs/tags/51.21

Already a few versions behind, seems to not include newest proton updates.
Sadly requires (at least) libadwaita 1.7 and gtk 4.17, or some heavy patching.
So either needs some time for these to be updated or creative ideas.. which are welcome :).

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 3, 2025
@rkunschke
Copy link

Libadwaita was upgraded in that PR: #386514
It's build is queued in the latest hydra build for now https://hydra.nixos.org/build/297164540
The same is true for gtk4 https://hydra.nixos.org/build/297141545

I guess working on that might be unblocked now :) (or after a successful build of unstable)

@XBagon
Copy link
Contributor Author

XBagon commented May 16, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 403938


x86_64-linux

✅ 2 packages built:
  • bottles
  • bottles-unwrapped

@XBagon XBagon marked this pull request as ready for review May 16, 2025 17:48
@nix-owners nix-owners bot requested review from Gliczy, SCOTT-HAMILTON and psydvl May 16, 2025 17:55
Copy link
Member

@Gliczy Gliczy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some additional sandbox checks were added in 51.18 (see bottlesdevs/Bottles@91e2798), which we need to patch out.

diff --git a/bottles/frontend/meson.build b/bottles/frontend/meson.build
index 6ff7c011..c26ea0b9 100644
--- a/bottles/frontend/meson.build
+++ b/bottles/frontend/meson.build
@@ -23,12 +23,6 @@ params_file = configure_file(
     configuration: conf
 )
 
-fs = import('fs')
-
-if not fs.is_file('/' + '.flatpak-info')
-  error('file does not exist')
-endif
-
 bottles_sources = [
   '__init__.py',
   'main.py',
diff --git a/bottles/frontend/views/bottle_details.py b/bottles/frontend/views/bottle_details.py
index 65667ea9..7ae1eb19 100644
--- a/bottles/frontend/views/bottle_details.py
+++ b/bottles/frontend/views/bottle_details.py
@@ -436,20 +436,19 @@ class BottleView(Adw.PreferencesPage):
             dialog.connect("response", execute)
             dialog.show()
 
-        if Xdp.Portal.running_under_sandbox():
-            if self.window.settings.get_boolean("show-sandbox-warning"):
-                dialog = Adw.MessageDialog.new(
-                    self.window,
-                    _("Be Aware of Sandbox"),
-                    _(
-                        "Bottles is running in a sandbox, a restricted permission environment needed to keep you safe. If the program won't run, consider moving inside the bottle (3 dots icon on the top), then launch from there."
-                    ),
-                )
-                dialog.add_response("dismiss", _("_Dismiss"))
-                dialog.connect("response", show_chooser)
-                dialog.present()
-            else:
-                show_chooser()
+        if self.window.settings.get_boolean("show-sandbox-warning"):
+            dialog = Adw.MessageDialog.new(
+                self.window,
+                _("Be Aware of Sandbox"),
+                _(
+                    "Bottles is running in a sandbox, a restricted permission environment needed to keep you safe. If the program won't run, consider moving inside the bottle (3 dots icon on the top), then launch from there."
+                ),
+            )
+            dialog.add_response("dismiss", _("_Dismiss"))
+            dialog.connect("response", show_chooser)
+            dialog.present()
+        else:
+            show_chooser()
 
     def __backup(self, widget, backup_type):
         """
diff --git a/bottles/frontend/views/bottle_preferences.py b/bottles/frontend/views/bottle_preferences.py
index 288e693b..b8b57618 100644
--- a/bottles/frontend/views/bottle_preferences.py
+++ b/bottles/frontend/views/bottle_preferences.py
@@ -139,7 +139,7 @@ class PreferencesView(Adw.PreferencesPage):
         self.queue = details.queue
         self.details = details
 
-        if not gamemode_available or not Xdp.Portal.running_under_sandbox():
+        if not gamemode_available:
             return
 
         _not_available = _("This feature is unavailable on your system.")
diff --git a/bottles/frontend/views/list.py b/bottles/frontend/views/list.py
index 43ab9c22..a283b178 100644
--- a/bottles/frontend/views/list.py
+++ b/bottles/frontend/views/list.py
@@ -82,8 +82,6 @@ class BottlesBottleRow(Adw.ActionRow):
 
     def run_executable(self, *_args):
         """Display file dialog for executable"""
-        if not Xdp.Portal.running_under_sandbox():
-            return
 
         def set_path(_dialog, response):
             if response != Gtk.ResponseType.ACCEPT:
diff --git a/bottles/frontend/views/new_bottle_dialog.py b/bottles/frontend/views/new_bottle_dialog.py
index a8b007d4..c6f0a156 100644
--- a/bottles/frontend/views/new_bottle_dialog.py
+++ b/bottles/frontend/views/new_bottle_dialog.py
@@ -80,7 +80,7 @@ class BottlesNewBottleDialog(Adw.Dialog):
         super().__init__(**kwargs)
         # common variables and references
         self.window = GtkUtils.get_parent_window()
-        if not self.window or not Xdp.Portal.running_under_sandbox():
+        if not self.window:
             return
 
         self.app = self.window.get_application()

I reviewed all commits between 51.17 and 51.21, this should be the only things that we must patch out.

Also, thank you for taking the time to work on this and adding yourself as a maintainer!

@XBagon XBagon requested a review from Gliczy May 16, 2025 22:53
Copy link
Member

@Gliczy Gliczy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e5d0b3e and a6ac3b2 should be squashed together, otherwise LGTM.

Diff: bottlesdevs/Bottles@refs/tags/51.17...refs/tags/51.21

bottles-unwrapped: update remove-flatpack-check.patch according to NixOS#403938 (review)
@Gliczy
Copy link
Member

Gliczy commented May 17, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 403938


x86_64-linux

✅ 2 packages built:
  • bottles
  • bottles-unwrapped

Copy link
Member

@Gliczy Gliczy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gliczy Gliczy added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels May 17, 2025
@Aleksanaa Aleksanaa merged commit b475c48 into NixOS:master May 17, 2025
22 of 23 checks passed
nixpkgs-ci bot pushed a commit that referenced this pull request May 17, 2025
Diff: bottlesdevs/Bottles@refs/tags/51.17...refs/tags/51.21

bottles-unwrapped: update remove-flatpack-check.patch according to #403938 (review)
(cherry picked from commit 2a7622d)
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented May 17, 2025

Successfully created backport PR for release-25.05:

@nixpkgs-ci nixpkgs-ci bot added the 8.has: port to stable This PR already has a backport to the stable release. label May 17, 2025
@lblasc
Copy link
Contributor

lblasc commented May 18, 2025

After the update I'm unable to lanch any bottle, any ideas ?

Traceback (most recent call last):
  File "/nix/store/32lhm54bdmacf5g7cc1ra6sh1k2pv4r3-bottles-unwrapped-51.21/share/bottles/bottles/frontend/views/list.py", line 116, in show_details
    self.window.page_details.view_preferences.update_combo_components()
  File "/nix/store/32lhm54bdmacf5g7cc1ra6sh1k2pv4r3-bottles-unwrapped-51.21/share/bottles/bottles/frontend/views/bottle_preferences.py", line 381, in update_combo_components
    self.combo_runner.handler_block_by_func(self.__set_runner)
TypeError: nothing connected to <bound method PreferencesView.__set_runner of <bottle_preferences.PreferencesView object at 0x7fbc2a2cc140 (DetailsPreferences at 0x21cbc220)>>

@Aleksanaa
Copy link
Member

After the update I'm unable to lanch any bottle, any ideas ?

I'm able to run plant vs zombie from both Bottles page and Library. Could you elaborate how you configured the program and how you started it?

@Aleksanaa
Copy link
Member

Maybe the runner you chose has been removed?

@lblasc
Copy link
Contributor

lblasc commented May 18, 2025

I'm trying to run existing battle.net bottle, I've also tried to create it from scratch, same issue. Runners look good.
Bottles are launched from nix-shell, I' haven't configured anything special, this is on NixOS machine with basic hyprland setup, 51.17 worked fine.

@Sirius902
Copy link
Contributor

After the update I'm unable to lanch any bottle, any ideas ?

I'm able to run plant vs zombie from both Bottles page and Library. Could you elaborate how you configured the program and how you started it?

I'm having the same issue. Clicking on any of the bottles from the bottles tab will do this. This means I can't access the page for a particular bottle unless I'm creating it for the first time (at which point it will transition to the bottle's page automatically).

Even creating the bottle from scratch, pressing the back button to return to the bottles page, then clicking on the bottle again in the list will give this error.

@XBagon
Copy link
Contributor Author

XBagon commented May 18, 2025

I'm trying to run existing battle.net bottle, I've also tried to create it from scratch, same issue. Runners look good. Bottles are launched from nix-shell, I' haven't configured anything special, this is on NixOS machine with basic hyprland setup, 51.17 worked fine.

A bit off-topic, but I also run Battle.net, which recently broke (still ran, just unusable). It still started fine after the update and now I could also download ge-proton10-1 and it works again. (This is why I created the PR :P)

@XBagon
Copy link
Contributor Author

XBagon commented May 18, 2025

This seems to not only affect the nixpkg, but other non-flatpak packages: bottlesdevs/Bottles#3860
Seemingly introduced in 5.18?
Searching further I found this https://aur.archlinux.org/packages/bottles#comment-1018093.
I have programs.gamemode.enabled = true; so maybe try that for the moment and then we probably need to add it as a dependency?
@lblasc @Sirius902

@Sirius902
Copy link
Contributor

This seems to not only affect the nixpkg, but other non-flatpak packages: bottlesdevs/Bottles#3860 Seemingly introduced in 5.18? Searching further I found this https://aur.archlinux.org/packages/bottles#comment-1018093. I have programs.gamemode.enabled = true; so maybe try that for the moment and then we probably need to add it as a dependency? @lblasc @Sirius902

@XBagon Adding programs.gamemode.enable = true; seems to have fixed the issue for me, looks like making it a dependency would be best.

@Gliczy
Copy link
Member

Gliczy commented May 18, 2025

I thought we already had gamemode as a dependency, but turns out we don't.
I can repro after disabling programs.gamemode.enable, and adding gamemode to propagatedBuildInputs does fix this.
I pushed this in #408450.

Gliczy pushed a commit to Gliczy/nixpkgs that referenced this pull request May 19, 2025
Diff: bottlesdevs/Bottles@refs/tags/51.17...refs/tags/51.21

bottles-unwrapped: update remove-flatpack-check.patch according to NixOS#403938 (review)
(cherry picked from commit 2a7622d)
MarcelCoding pushed a commit to NuschtOS/nuschtpkgs that referenced this pull request May 24, 2025
Diff: bottlesdevs/Bottles@refs/tags/51.17...refs/tags/51.21

bottles-unwrapped: update remove-flatpack-check.patch according to NixOS/nixpkgs#403938 (review)
(cherry picked from commit 2a7622d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants