From 55346915283750bbb6641d0dd82e643fccd4dca0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 23 Aug 2019 11:26:49 +0100 Subject: [PATCH] Skip `gpg-connect-agent` when cleaning up temporary GPG home directories It appears this is sometimes done when it wasn't needed, causing gpg-connect-agent to wait for an agent to start so that it can tell it to stop, which results in a lot of noise on stderr when running `flatpak update`. Debian 10 has GPG 2.2, and according to the commit message of the commit I'm reverting here, this cleanup should be unnecessary with GPG >= 2.2. --- debian/changelog | 8 +++ ...-agent-when-cleaning-up-tmp-homedirs.patch | 49 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 58 insertions(+) create mode 100644 debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch diff --git a/debian/changelog b/debian/changelog index 717e828a..77675037 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,14 @@ ostree (2019.3-1) UNRELEASED; urgency=medium * New upstream release - Refresh patch series + * d/p/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch: + Skip `gpg-connect-agent` when cleaning up temporary GPG home + directories. It appears this is sometimes done when it wasn't + needed, causing gpg-connect-agent to wait for an agent to start so + that it can tell it to stop, which results in a lot of noise on stderr + when running `flatpak update`. Debian 10 has GPG 2.2, and according to + the commit message of the commit I'm reverting here, this cleanup + should be unnecessary with GPG >= 2.2. -- Simon McVittie Fri, 23 Aug 2019 08:38:47 +0100 diff --git a/debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch b/debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch new file mode 100644 index 00000000..7c1cc15e --- /dev/null +++ b/debian/patches/debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch @@ -0,0 +1,49 @@ +From: Simon McVittie +Date: Fri, 23 Aug 2019 11:22:47 +0100 +Subject: Revert "lib: Kill GPG agent when cleaning up tmp homedirs" + +This reverts commit b6979e7572395f3f99ba328ed9399ed4b862f9a7, +which causes a lot of logging noise when running `flatpak update`. +According to the commit message of b6979e7572395f3f99ba328ed9399ed4b862f9a7 +this should be unnecessary with gnupg >= 2.2, which is in Debian >= 10. + +Forwarded: not-needed +--- + src/libostree/ostree-gpg-verifier.c | 1 - + src/libostree/ostree-repo.c | 8 ++------ + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c +index 95ed36e..a279348 100644 +--- a/src/libostree/ostree-gpg-verifier.c ++++ b/src/libostree/ostree-gpg-verifier.c +@@ -87,7 +87,6 @@ verify_result_finalized_cb (gpointer data, + * finalize() method, but I didn't want this keyring hack + * bleeding into multiple classes. */ + +- ot_gpgme_kill_agent (tmp_dir); + (void) glnx_shutil_rm_rf_at (AT_FDCWD, tmp_dir, NULL, NULL); + } + +diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c +index eb652be..2382f73 100644 +--- a/src/libostree/ostree-repo.c ++++ b/src/libostree/ostree-repo.c +@@ -2328,15 +2328,11 @@ out: + if (remote != NULL) + ostree_remote_unref (remote); + +- if (source_tmp_dir != NULL) { +- ot_gpgme_kill_agent (source_tmp_dir); ++ if (source_tmp_dir != NULL) + (void) glnx_shutil_rm_rf_at (AT_FDCWD, source_tmp_dir, NULL, NULL); +- } + +- if (target_tmp_dir != NULL) { +- ot_gpgme_kill_agent (target_tmp_dir); ++ if (target_tmp_dir != NULL) + (void) glnx_shutil_rm_rf_at (AT_FDCWD, target_tmp_dir, NULL, NULL); +- } + + g_prefix_error (error, "GPG: "); + diff --git a/debian/patches/series b/debian/patches/series index b73e566a..21ecd1cf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ debian/Skip-test-pull-repeated-during-CI.patch +debian/Revert-lib-Kill-GPG-agent-when-cleaning-up-tmp-homedirs.patch