From the gpg-agent manual page, the option --daemon is supposed to keep the
http://bugzilla.suse.com/show_bug.cgi?id=1051035 Bug ID: 1051035 Summary: zypper up leaves gpg-agent running Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: All OS: SUSE Other Status: NEW Severity: Minor Priority: P5 - None Component: Maintenance Assignee: bnc-team-screening@forge.provo.novell.com Reporter: Ralf.Friedl@online.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- OS is Tumbleweed. Each run of "zypper up" leaves one or two processes of gpg-agent running. Example 1 is when nothing is changed in the repositories, it leaves one gpg-agent process running in .../zypp-trusted. Example 2 forces a download of repo-update, this leaves two gpg-agent processes running, one in .../zypp-trusted and one in .../zypp-general. The directories under /var/tmp/zypp. are deleted after zypper exits. program running, --use-standard-socket has no effect. The right option seems to be --server so that gpg-agent accepts commands on stdin but exits as soon as stdin closes. Also, why is gpg-agent started at all? It is started with a temporary directory as --homedir, and then queries for the existence of keys within this newly created directory. Example 1: # killall gpg-agent # ps l -C gpg-agent F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND # strace -s200 -feexecve zypper up execve("/usr/bin/zypper", ["zypper", "up"], 0x7ffcbf82e648 /* 59 vars */) = 0 [pid 30952] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--import", "--homedir", "/var/tmp/zypp.aU8FU1/zypp-trusted-krZsV9rZ", "--no-default-keyring", "--quiet", "--no-tty", "--no-greeting", "--no-permission-warning", "--status-fd", "1", "/var/tmp/zypp.aU8FU1/TmpFile.Uo0CEU"], 0x7f896ae64950 /* 62 vars */) = 0 [pid 30954] execve("/usr/bin/gpg-agent", ["gpg-agent", "--homedir", "/var/tmp/zypp.aU8FU1/zypp-trusted-krZsV9rZ", "--use-standard-socket", "--daemon"], 0x7ffe75b26b90 /* 62 vars */) = 0 Loading repository data... Reading installed packages... Nothing to do. <---- here strace waits for gpg-agent to exit, killall gpg-agent from another terminal is necessary --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=30959, si_uid=0} --- +++ exited with 0 +++ Example 2: # killall gpg-agent # ps l -C gpg-agent F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND # rm -r /var/cache/zypp/raw/repo-update/repodata # strace -s200 -feexecve zypper up execve("/usr/bin/zypper", ["zypper", "up"], 0x7ffd98d67d48 /* 59 vars */) = 0 [pid 30968] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--import", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-trusted-kr3Ntfzf", "--no-default-keyring", "--quiet", "--no-tty", "--no-greeting", "--no-permission-warning", "--status-fd", "1", "/var/tmp/zypp.ajNXqC/TmpFile.DV3RZv"], 0x7f928f72f950 /* 62 vars */) = 0 [pid 30970] execve("/usr/bin/gpg-agent", ["gpg-agent", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-trusted-kr3Ntfzf", "--use-standard-socket", "--daemon"], 0x7fff7bbcf4d0 /* 62 vars */) = 0 [pid 30976] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "-v", "--no-default-keyring", "--fixed-list-mode", "--with-fingerprint", "--with-colons", "--homedir", "/var/tmp/zypp.ajNXqC/PublicKey", "--quiet", "--no-tty", "--no-greeting", "--batch", "--status-fd", "1", "/var/tmp/TmpFile.Nw0oTp"], 0x7f928f72f950 /* 62 vars */) = 0 [pid 30977] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--import", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-general-krpJJyHS", "--no-default-keyring", "--quiet", "--no-tty", "--no-greeting", "--no-permission-warning", "--status-fd", "1", "/var/tmp/TmpFile.Nw0oTp"], 0x7f928f72f950 /* 62 vars */) = 0 [pid 30979] execve("/usr/bin/gpg-agent", ["gpg-agent", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-general-krpJJyHS", "--use-standard-socket", "--daemon"], 0x7ffcbd2c79a0 /* 62 vars */) = 0 [pid 30982] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--homedir", "/var/tmp/zypp.ajNXqC/fake-keyringrJDqo5", "--no-default-keyring", "--quiet", "--no-tty", "--no-greeting", "--batch", "--status-fd", "1", "/var/cache/zypp/raw/repo-updateMgLSnY/repodata/repomd.xml.asc"], 0x7f928f72f950 /* 62 vars */) = 0 [pid 30983] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--list-public-keys", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-trusted-kr3Ntfzf", "--no-default-keyring", "--quiet", "--with-colons", "--fixed-list-mode", "--with-fingerprint", "--with-sig-list", "--no-tty", "--no-greeting", "--batch", "--status-fd", "1"], 0x7f928f72f950 /* 62 vars */) = 0 [pid 30984] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--list-public-keys", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-general-krpJJyHS", "--no-default-keyring", "--quiet", "--with-colons", "--fixed-list-mode", "--with-fingerprint", "--with-sig-list", "--no-tty", "--no-greeting", "--batch", "--status-fd", "1"], 0x7f928f72f950 /* 62 vars */) = 0 [pid 30985] execve("/usr/bin/gpg2", ["/usr/bin/gpg2", "--verify", "--homedir", "/var/tmp/zypp.ajNXqC/zypp-trusted-kr3Ntfzf", "--no-default-keyring", "--quiet", "--no-tty", "--batch", "--no-greeting", "--status-fd", "1", "/var/cache/zypp/raw/repo-updateMgLSnY/repodata/repomd.xml.asc", "/var/cache/zypp/raw/repo-updateMgLSnY/repodata/repomd.xml"], 0x7f928f72f950 /* 62 vars */) = 0 Retrieving repository 'repo-update' metadata -----------------------------[done] Nothing to do. <---- here strace waits for gpg-agent to exit, killall gpg-agent from another terminal is necessary [pid 30980] --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=31129, si_uid=0} --- [pid 30971] --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=31129, si_uid=0} --- -- You are receiving this mail because: You are on the CC list for the bug.