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

ostree-2019.3 spams terminal with gpg-connect-agent messages for every flatpak operation #1907

Closed
kparal opened this issue Aug 30, 2019 · 3 comments

Comments

@kparal
Copy link

kparal commented Aug 30, 2019

With ostree-2019.3-3.fc30.x86_64 I see this:

$ flatpak install peek
Looking for matches…
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
Found similar ref(s) for ‘peek’ in remote ‘flathub’ (system).
Use this remote? [Y/n]: y
Found ref ‘app/com.uploadedlobster.peek/x86_64/stable’ in remote ‘flathub’ (system).
Use this ref? [Y/n]: y
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
Required runtime for com.uploadedlobster.peek/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.32) found in remote flathub
Do you want to install it? [Y/n]: n

With ostree-2019.2-1.fc30.x86_64 I see this:

$ flatpak install peek
Looking for matches…
Found similar ref(s) for ‘peek’ in remote ‘flathub’ (system).
Use this remote? [Y/n]: y
Found ref ‘app/com.uploadedlobster.peek/x86_64/stable’ in remote ‘flathub’ (system).
Use this ref? [Y/n]: y
Required runtime for com.uploadedlobster.peek/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.32) found in remote flathub
Do you want to install it? [Y/n]: n

Compare for yourself which one looks more readable. The gpg-agent messages are printed out very frequently, for a single flatpak update command that has "nothing to do", I saw about 20 lines of gpg-agent messages (depends on what's happening in the background, usually it's just 3-6 lines of messages).

This is happening on Fedora 30, but Arch users see it as well:
https://bbs.archlinux.org/viewtopic.php?id=248745

This happens regardless of gpg-agent actually running or not running in the background.

@cgwalters
Copy link
Member

Likely fallout from #1799

@cgwalters
Copy link
Member

@dbnicholson

@dbnicholson
Copy link
Member

Sorry, I have a patch for it for a different thing I was working on. I tried to check if it was needed for any current operations, but it didn't seem like it. The issue is that gpg-agent doesn't get launched for all gpgme operation and gpg-connect-agent helpfully tells you about it.

Anyways, I'll split my patch out to a separate PR. Sorry for not sending it when I first noticed it.

dbnicholson added a commit to dbnicholson/ostree that referenced this issue Aug 30, 2019
When listing GPG keys, the temporary GPG homedir will be constructed by
simply copying the remote's trusted keys to the pubring.gpg file. In
that case, no GPG operations spawning gpg-agent will be run. When
gpg-connect-agent is run to cleanup the homedir, it will helpfully print
on stderr that it's starting gpg-agent like so:

gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established

Send gpg-connect-agent's stderr to a pipe and only send it to the
application's stderr if an error was encountered.

Fixes: ostreedev#1907
d4s pushed a commit to d4s/ostree that referenced this issue Nov 4, 2019
When listing GPG keys, the temporary GPG homedir will be constructed by
simply copying the remote's trusted keys to the pubring.gpg file. In
that case, no GPG operations spawning gpg-agent will be run. When
gpg-connect-agent is run to cleanup the homedir, it will helpfully print
on stderr that it's starting gpg-agent like so:

gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established

Send gpg-connect-agent's stderr to a pipe and only send it to the
application's stderr if an error was encountered.

Fixes: ostreedev#1907

Closes: ostreedev#1908
Approved by: cgwalters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants