Missing dependency to gnupg/gnupg2?

If you have any suggestions or ideas about improving Salix, here's the place to post them.
Post Reply
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Missing dependency to gnupg/gnupg2?

Post by Papasot »

Although gnupg and gnupg2 will work on Salix 15, they have limited use because you can't generate keys. gpg2 --full-generate-key won't work because it needs pinentry, which is not installed as a dependency. Same with gpa, the graphical interface for gnupg.
I am not quite sure you will consider this a "hardcore" dependency, but I don't think gnupg/gnupg2 make much sense if you are unable to generate keys, and it's certainly limited functionality. So I guess pinentry should be a dependency for gnupg/gnupg2.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Missing dependency to gnupg/gnupg2?

Post by gapan »

This is a hard one. On one hand, gnupg works without pinentry, even in a limited capacity, so it can't possibly be a dependency. If someone wants to do that, install the pinentry package, the message you get is self-explanatory I think ("no pinentry").

On the other hand, you're right, generating keys is important and pinentry should probably be considered a dependency, even if it actually isn't.

The problem with the second approach, is that the pinentry package includes an ncurses, a GTK2, a GTK3 and a Qt interface. So, if everything in the package should be working after installing pinentry, GTK2, GTK3 and Qt libraries have to be included in pinentry's dependencies. That of course will in turn drag in all dependencies of GTK2, GTK3 and Qt. You would need all these to have gpg installed and working 100%, which is insane, gpg is a command line tool.

So, the question becomes: do all these have to be dependencies of the pinentry package?

Well, if they aren't, then you will install pinentry and have several executables in your system that will simply not work, if you don't have the respective GUI libraries installed. It doesn't help that /usr/bin/pinentry is a symlink to /usr/bin/pinentry-gtk-2 by default, so by simply calling pinentry, as gpg does, wouldn't work anyway!

Ideally, the GUI stuff should probably be split into separate packages, but Slackware will never do that.

Another idea, is to add some detection code to the zzz-settings package, which is meant to fix such stuff after installation, and if it detects that no GUI libraries are installed (such as in a CORE installation), then it would point the symlink to the ncurses pinentry executable. You would still have all the GUI versions installed and not working though. And this fix would require a new ISO in any case...
Image
Image
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Re: Missing dependency to gnupg/gnupg2?

Post by Papasot »

The logical way to do this is to have gnupg dependent on a cli package, say pinentry-ncurses, and gpa dependent on a GUI package, say pinentry-GTK3. But as you said Slackware will never do that - it doesn't have to, since they have the "install them all" policy. Still, it is silly to use a command line tool like gnupg and have a GTK window popping up just to type something. I guess I will just modify the pinentry symlink so that it points to pinentry-curses instead of pinentry-gtk-2.

Since you mentioned a new ISO, I have encountered the first issues with gcc 11.2 - earlier than I expected, but they are already here (and they are solvable but annoying). Slackware-Current already has gcc 13.2 (and none of the issues I have exist there, not even in gcc 12.2 actually). Let's just hope 15.1 - or whatever next release would be - won't take too long.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
Post Reply