rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
75 stars 91 forks source link

Exit gpg-agent after repokey import (RhBug:1650266) #154

Closed jrohel closed 5 years ago

jrohel commented 5 years ago

It tries to exit gpg-agent. Path to the communication socket is derived from homedir. The gpg-agent automaticaly removes all its socket before exit. Newer gpg-agent creates sockets under [/var]/run/user/{pid}/... if directory exists. In this case gpg-agent will not be exited. It solves the https://bugzilla.redhat.com/show_bug.cgi?id=1650266 issue of remaining sockets in the gpg home directory.

This PR replaces another solution https://github.com/rpm-software-management/librepo/pull/152 that configures the gpg agent to run in server mode (without sockets). Importing of repo keys was very slow with gpg-agent in server mode during the unit tests.

j-mracek commented 5 years ago

LGTM!