Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package: btrfs-assistant-1.6.3 #38265

Closed

Conversation

tranzystorekk
Copy link
Contributor

Closes #38255

Testing the changes

  • I tested the changes in this PR: NO

New package

@tranzystorekk
Copy link
Contributor Author

@BT-Justice could you test this? I don't manage any BTRFS filesystems.

@meator
Copy link
Contributor

meator commented Jul 25, 2022

btrfs-assistant works fine on my machine. What's the difference between btrfs-assistant and btrfs-assistant-bin? They seem to launch the same program, but btrfs-assistant-bin prints:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

btrfs-assistant doesn't print any warnings and just works. I have elogind up and running (not as a service) and I never had issues with XDG_RUNTIME_DIR. But this is just a warning and btrfs-assistant-bin launches anyway without any problems.

When I try to launch btrfs-assistant-launcher (which is also executed by the desktop file), I get:

$ sudo btrfs-assistant-launcher
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

/bin/btrfs-assistant: line 27: 29130 Aborted                 btrfs-assistant-bin ${params}

I have tried to execute this in different ways (through a root shell instead of using sudo, tried to mess with $XDG_RUNTIME_DIR, tried to run it without sudo and authenticate via the default polkit). I have no idea if this is a problem on my end, I'm not doing any nonstandard things, I have regular Xorg, there's no sshing involved, I'm doing this locally.

This says that some dependencies might be missing. Some other people had this exact problem when launching Qt creator, but Qt creator works without problems for me.

@tranzystorekk
Copy link
Contributor Author

tranzystorekk commented Jul 25, 2022

btrfs-assistant-bin is the actual binary that does everything, while btrfs-assistant{,-launcher} are bash scripts that respectively set some additional variables and execute with polkit

@meator
Copy link
Contributor

meator commented Jul 25, 2022

Oh, that makes sense. It's weird that pkexec in btrfs-assistant-launcher somehow breaks Qt.

@meator
Copy link
Contributor

meator commented Jul 25, 2022

But other than that it's working. I use btrfs and snapper on my system and btrfs-assistant can manage everything.

@sgn
Copy link
Member

sgn commented Jul 25, 2022

Oh, that makes sense. It's weird that pkexec in btrfs-assistant-launcher somehow breaks Qt.

Does btrfs-assistant-launcher work without sudo?

@tranzystorekk
Copy link
Contributor Author

According to https://gitlab.com/btrfs-assistant/btrfs-assistant/-/issues/24 it needs root for most functionality

@meator
Copy link
Contributor

meator commented Jul 25, 2022

Does btrfs-assistant-launcher work without sudo?

As tranzystorek-io pointed out, btrfs-assistant-launcher is just

#!/usr/bin/env bash

pkexec btrfs-assistant --xdg-desktop=$XDG_CURRENT_DESKTOP

It uses pkexec for privilege escalation when run without sudo and then fails with the same error.

Interestingly

pkexec env DISPLAY=:0 btrfs-assistant --xdg-desktop=$XDG_CURRENT_DESKTOP

works. I think it's because pkexec strips unsafe environment variables which include $DISPLAY, and because Qt needs that, it fails.

@BT-Justice
Copy link

@BT-Justice could you test this? I don't manage any BTRFS filesystems.

I will as soon as I can. Thanks for adding it to Void!

I know on Fedora using btrfs-assistant that it asks for the sudo password before opening. That is probably normal behavior as it needs to do advanced things.

@meator
Copy link
Contributor

meator commented Jul 25, 2022

Sorry, I'm probably just creating confusion. This has to be an error on my part. /usr/share/polkit-1/actions/org.btrfs-assistant.pkexec.policy has

    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>

so the $DISPLAY environment variable should be retained. My polkit is probably misconfigured.

@tranzystorekk
Copy link
Contributor Author

I wish it didn't error out when no btrfs fs is present so that I could at least test the basic interface etc. 😆

@BT-Justice
Copy link

So far so good. Thank you!

Obviously the systemd Unit Settings on the Snapper Settings tab are missing for Snapper timeline enabled, Snapper cleanup enabled, and Snapper boot enabled. The Btrfs maintenance tab is missing, but I assume that is also due to systemd.

I'll have to learn if snapper will do any kind of automatic timeline snapshots on runit.

Also @tranzystorek-io ... https://btrfs.readthedocs.io/en/latest/Convert.html

@classabbyamp
Copy link
Member

classabbyamp commented Jul 25, 2022

I'll have to learn if snapper will do any kind of automatic timeline snapshots on runit.

if not, it should be fairly straightforward to "port" a systemd service/timer to a runit service

@tranzystorekk
Copy link
Contributor Author

To be fair, btrfs-maintenance is a runtime dependency according to upstream, but I didn't find it in void packages

@meator
Copy link
Contributor

meator commented Jul 25, 2022

I'll have to learn if snapper will do any kind of automatic timeline snapshots on runit.

Snapper isn't managed by runit. Automatic snapper snapshots are managed by cron. The "Snapshot Retention" section under the "Snapper Settings" tab should be still visible and functional. You should set up a cron daemon if you haven't already.

I am actively using Snapper on my main / btrfs partition (specifically on my /home folder) and I haven't had any issues with it.

To be fair, btrfs-maintenance is a runtime dependency according to upstream, but I didn't find it in void packages

It's also mentioned in /etc/btrfs-assistant.conf.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Nov 23, 2022
@tranzystorekk tranzystorekk changed the title New package: btrfs-assistant-1.6.1 New package: btrfs-assistant-1.6.3 Nov 27, 2022
@github-actions github-actions bot removed the Stale label Nov 28, 2022
@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Feb 26, 2023
@tranzystorekk
Copy link
Contributor Author

Closing due to me ultimately not being interested in maintaining this, after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package This PR adds a new package Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: btrfs-assistant
5 participants