diff options
author | Ulrich Müller <ulm@gentoo.org> | 2023-11-16 19:27:52 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2023-11-16 20:30:22 +0100 |
commit | ecafd0276eb5d7c0b5f267136164a6f4e8cb4e09 (patch) | |
tree | b4b74486485fc9b59359175a495edc8b0e17200b /app-emacs | |
parent | www-apps/icingaweb2: add 2.12.1 (diff) | |
download | gentoo-ecafd0276eb5d7c0b5f267136164a6f4e8cb4e09.tar.gz gentoo-ecafd0276eb5d7c0b5f267136164a6f4e8cb4e09.tar.bz2 gentoo-ecafd0276eb5d7c0b5f267136164a6f4e8cb4e09.zip |
app-emacs/pinentry: new package, add 0.1_p20170913
This has been taken from lisp/net/pinentry.el in the GNU Emacs
repository. The file was dropped in Emacs 26 because of its sparse
documentation (see upstream bug at https://debbugs.gnu.org/27445
and etc/NEWS.26 in Emacs).
The package is still useful, e.g. with gpgsm, where loopback
pinentry-mode isn't supported by EasyPG.
The corresponding client is installed by app-crypt/pinentry[emacs]
as pinentry-emacs.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-emacs')
-rw-r--r-- | app-emacs/pinentry/Manifest | 1 | ||||
-rw-r--r-- | app-emacs/pinentry/files/50pinentry-gentoo.el | 11 | ||||
-rw-r--r-- | app-emacs/pinentry/files/README.gentoo | 14 | ||||
-rw-r--r-- | app-emacs/pinentry/files/pinentry-emacs-29.patch | 32 | ||||
-rw-r--r-- | app-emacs/pinentry/metadata.xml | 9 | ||||
-rw-r--r-- | app-emacs/pinentry/pinentry-0.1_p20170913.ebuild | 20 |
6 files changed, 87 insertions, 0 deletions
diff --git a/app-emacs/pinentry/Manifest b/app-emacs/pinentry/Manifest new file mode 100644 index 000000000000..5dd4f9c72dc5 --- /dev/null +++ b/app-emacs/pinentry/Manifest @@ -0,0 +1 @@ +DIST pinentry-0.1_p20170913.el.xz 4792 BLAKE2B b2c301720a42f43ad5d1986c427e972cfb197d98bd5bd878106a591e1d54800843f3e607c8d6933bd50b695ae8447d8d2aed772615846a5ce5acf6a67c009a8a SHA512 d582328e64abcc8ef964b4e4b136b9814ecc92edc930a922012809313f7dfdbf407890f9592d37b784f50fda44cf8acf5500881cf33966a1160c8496c201ac33 diff --git a/app-emacs/pinentry/files/50pinentry-gentoo.el b/app-emacs/pinentry/files/50pinentry-gentoo.el new file mode 100644 index 000000000000..7d62354a886f --- /dev/null +++ b/app-emacs/pinentry/files/50pinentry-gentoo.el @@ -0,0 +1,11 @@ +(add-to-list 'load-path "@SITELISP@") +(autoload 'pinentry-start "pinentry" + "Start a Pinentry service. + +Once the environment is properly set, subsequent invocations of +the gpg command will interact with Emacs for passphrase input. + +If the optional QUIET argument is non-nil, messages at startup +will not be shown. + +\(fn &optional QUIET)" t) diff --git a/app-emacs/pinentry/files/README.gentoo b/app-emacs/pinentry/files/README.gentoo new file mode 100644 index 000000000000..30eff9ad23c0 --- /dev/null +++ b/app-emacs/pinentry/files/README.gentoo @@ -0,0 +1,14 @@ +This package (and corresponding support in app-crypt/pinentry) +provides a way to input a passphrase through the Emacs minibuffer. + +To use it, add the line + + allow-emacs-pinentry + +to your gpg-agent.conf configuration file, which can usually be found +in the ~/.gnupg/ directory. + +The pinentry server can be started with the command "pinentry-start". +You may add the following line to your Emacs configuration file: + + (pinentry-start 'quiet) diff --git a/app-emacs/pinentry/files/pinentry-emacs-29.patch b/app-emacs/pinentry/files/pinentry-emacs-29.patch new file mode 100644 index 000000000000..e737a81538aa --- /dev/null +++ b/app-emacs/pinentry/files/pinentry-emacs-29.patch @@ -0,0 +1,32 @@ +Fix byte-compile warnings in Emacs 29. +Drop cl-lib which was needed only for cl-letf. + +--- a/pinentry.el ++++ b/pinentry.el +@@ -49,8 +49,6 @@ + + ;;; Code: + +-(eval-when-compile (require 'cl-lib)) +- + (defgroup pinentry nil + "The Pinentry server" + :version "25.1" +@@ -92,7 +90,7 @@ + + ;; These error codes are defined in libgpg-error/src/err-codes.h.in. + (defmacro pinentry--error-code (code) +- (logior (lsh 5 24) code)) ++ (logior (ash 5 24) code)) + (defconst pinentry--error-not-implemented + (cons (pinentry--error-code 69) "not implemented")) + (defconst pinentry--error-cancelled +@@ -174,7 +172,7 @@ + (ignore-errors + (let (delete-by-moving-to-trash) + (delete-file server-file))) +- (cl-letf (((default-file-modes) ?\700)) ++ (with-file-modes ?\700 + (setq pinentry--server-process + (make-network-process + :name "pinentry" diff --git a/app-emacs/pinentry/metadata.xml b/app-emacs/pinentry/metadata.xml new file mode 100644 index 000000000000..986088003fe1 --- /dev/null +++ b/app-emacs/pinentry/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnu-emacs@gentoo.org</email> + <name>Gentoo GNU Emacs project</name> +</maintainer> +<stabilize-allarches/> +</pkgmetadata> diff --git a/app-emacs/pinentry/pinentry-0.1_p20170913.ebuild b/app-emacs/pinentry/pinentry-0.1_p20170913.ebuild new file mode 100644 index 000000000000..75567ef64167 --- /dev/null +++ b/app-emacs/pinentry/pinentry-0.1_p20170913.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp readme.gentoo-r1 + +DESCRIPTION="GnuPG Pinentry server implementation for Emacs" +HOMEPAGE="https://www.emacswiki.org/emacs/EasyPG" +# taken from lisp/net/pinentry.el in GNU Emacs repo (commit bc511a64f6da) +SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.el.xz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="app-crypt/pinentry[emacs]" + +PATCHES=( "${FILESDIR}"/${PN}-emacs-29.patch ) +SITEFILE="50${PN}-gentoo.el" |