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

Regarding packages pass, pass-otp, passmenu. Clipboard terminal program required. Passmenu requires GUI pinentry-program #53870

Closed
computative opened this issue Jan 6, 2025 · 6 comments
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed

Comments

@computative
Copy link

Is this a new report?

Yes

System Info

Void 6.12.7_1 x86_64 GenuineIntel notuptodate rFF

Package(s) Affected

pass, pass-otp, passmenu

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No. But this thread is related. Although as you can see, he doesn't fully appreciate the issue: https://www.reddit.com/r/voidlinux/comments/nabzqd/no_password_prompts/

Expected behaviour

  1. The mentioned three packages should have the ability to copy passwords to clipboard
  2. One of the programs, 'passmenu' should prompt the user for a password in a pop-up window.

Actual behaviour

At present, the mentioned packages do not install all the appropriate dependencies. The functionality breaks in two ways

  1. All 3 mentioned packages (pass. pass-otp, passmenu) require 'xclip' on x, and the command 'wl-copy' on wayland (i believe wl-copy is in the 'wl-clipboard' package). If not installed, the 'copy' functionality of the programs doesn't work. Especially passmenu is rendered completely broken. This is the current behaviour.
  2. If 'passmenu' doesn't show a gui prompt, it fails completely. For this, one of the GUI pinentry-programs, for example 'pinentry-gtk', should be installed and a soft link must be made to /usr/bin/pinentry say by ln -s /usr/bin/pinentry-gtk-2 /usr/bin/pinentry. This is the current behaviour.

Steps to reproduce

FOR pass AND pass-otp DO THE FOLLOWING
By default, xclip and wl-clipboard are not installed with the packages, so to reproduce remove them to start off.
$ xbps-remove xclip wl-clipboard
$ xbps-install pass
$ pass init $GPG_KEY_ID
$ pass insert hello
In the prompt type world and hit enter. Then when prompted again type world and hit enter.
$ pass show -c hello
In the prompt enter 'world'

  • FAIL: This should fail to copy the password to the clipboard if xclip (or the wayland equivalent) are not installed. I believe you will see an error in the terminal as well.

FOR passmenu DO THE FOLLOWING

$ /usr/bin/passmenu

It will prompt for a password

  • FAIL1: If the user does not receive a password prompt at this point because a suitable pinentry-program /usr/bin/pinentry-gtk-2 isn't installed and linked, the program stops.
  • FAIL2: If pass or pass-otp are broken as described above, no password is copied to the clipboard.
@computative computative added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Jan 6, 2025
@classabbyamp
Copy link
Member

you should not need to manually symlink any pinentry, as it is an alternative group, xbps-alternatives -s pinentry-gtk if you want the gtk2 one, or another if you want a different one

do these programs have an error message if a clipboard program isn't installed?

@computative
Copy link
Author

computative commented Jan 7, 2025

The message is «Error: Could not copy data to the clipboard». In the version I have of pass/pass-otp, it's on line 180 of /usr/bin/pass.

@ahesford
Copy link
Member

These are not bugs. Users might be using Wayland and want to use wl-copy. Other users may want to use xclip. Requiring either or both would be incorrect for at least some subset of users. The same applies to pinentry, because users may prefer any of the alternatives we provide.

XBPS has no provision for optional dependencies or recommendations, so we are left expecting users to understand when optional functionality requires extra packages and act accordingly.

@ahesford ahesford closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2025
@computative
Copy link
Author

computative commented Jan 15, 2025 via email

@ahesford
Copy link
Member

I regularly use pass, and most of the use isn't copying things to a clipboard. The application doesn't do "nothing" without a clipboard program. Furthermore, the program's use of these tools is listed right in the manual page.

The lack of optional dependencies in XBPS is neither a bug nor a feature, but a limitation. The fact that we don't thrust unnecessary sets of dependencies on all users just to placate an arbitrary subset of them most definitely is a feature.

You know what tools you were missing and have solved your problem. It's time to move on to more important things!

@computative
Copy link
Author

computative commented Jan 15, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed
Projects
None yet
Development

No branches or pull requests

3 participants