From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3CA22138350 for ; Fri, 20 Mar 2020 15:29:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 591EBE0ADE; Fri, 20 Mar 2020 15:29:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3C44CE0ADE for ; Fri, 20 Mar 2020 15:29:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1574F34F27F for ; Fri, 20 Mar 2020 15:29:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ACEF513A for ; Fri, 20 Mar 2020 15:29:30 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1584718140.418ec12aa4ce223f7688c215040b6c8544798b63.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/gnupg/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/gnupg/gnupg-2.2.19.ebuild X-VCS-Directories: app-crypt/gnupg/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 418ec12aa4ce223f7688c215040b6c8544798b63 X-VCS-Branch: master Date: Fri, 20 Mar 2020 15:29:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f9bc0fc6-519a-4912-b0f2-d290b9ad7acc X-Archives-Hash: 0e6548de9fed11f9539709e51ed2a2de commit: 418ec12aa4ce223f7688c215040b6c8544798b63 Author: David Seifert gentoo org> AuthorDate: Fri Mar 20 15:29:00 2020 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Mar 20 15:29:00 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418ec12a app-crypt/gnupg: Enable SSH_AUTH_SOCK in systemctl --user mode Package-Manager: Portage-2.3.94, Repoman-2.3.21 Acked-by: Kristian Fiskerstrand gentoo.org> Signed-off-by: David Seifert gentoo.org> app-crypt/gnupg/gnupg-2.2.19.ebuild | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app-crypt/gnupg/gnupg-2.2.19.ebuild b/app-crypt/gnupg/gnupg-2.2.19.ebuild index 0a1d2df46af..e756ff966ad 100644 --- a/app-crypt/gnupg/gnupg-2.2.19.ebuild +++ b/app-crypt/gnupg/gnupg-2.2.19.ebuild @@ -53,6 +53,19 @@ PATCHES=( "${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch" ) +src_prepare() { + default + + # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode, + # idea borrowed from libdbus, see + # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6 + # + # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl', + # which in turn requires discovery in Autoconf, something that upstream deeply resents. + sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \ + -i doc/examples/systemd-user/gpg-agent-ssh.socket || die +} + src_configure() { local myconf=()