[PATCH 0/2] gnu: emacs-password-store: Refer directly to password-store.

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • (
Owner
unassigned
Submitted by
(
Severity
normal
(
(address . guix-patches@gnu.org)(name . ()(address . paren@disroot.org)
20221009165608.16412-1-paren@disroot.org
This patchset removes a propagated external command, which, as we all know, are
malicious parasites that have no purpose in life but undermining the benefits of
Guix.

( (2):
gnu: emacs-password-store: Refer directly to password-store.
gnu: emacs-ivy-pass: Don't propagate password-store.

gnu/packages/emacs-xyz.scm | 64 +++++++++++++++++++++-----------------
1 file changed, 36 insertions(+), 28 deletions(-)

--
2.38.0
(
[PATCH 1/2] gnu: emacs-password-store: Refer directly to password-store.
(address . 58397@debbugs.gnu.org)(name . ()(address . paren@disroot.org)
20221009165749.16619-1-paren@disroot.org
* gnu/packages/emacs-xyz.scm (emacs-password-store)[arguments]:
Use gexp style.
<#:phases>{'extract-el-file}: New phase.
[propagated-inputs]<password-store>: Move it...
[inputs]: ...here.
---
gnu/packages/emacs-xyz.scm | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8134a19d56..6f415dc7b1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -18918,24 +18918,33 @@ (define-public emacs-password-store
(uri (git-reference
(url "git://git.zx2c4.com/password-store")
(commit commit)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0ni62f4pq96g0i0q66bch1dl9k4zqwhg7xaf746k3gbbqxcdh3vi"))
- (file-name (git-file-name name version))))
+ "0ni62f4pq96g0i0q66bch1dl9k4zqwhg7xaf746k3gbbqxcdh3vi"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'extract-el-file
- (lambda _
- (copy-file "contrib/emacs/password-store.el" "password-store.el")
- (delete-file-recursively "contrib")
- (delete-file-recursively "man")
- (delete-file-recursively "src")
- (delete-file-recursively "tests"))))))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'extract-el-file
+ (lambda _
+ (copy-file "contrib/emacs/password-store.el"
+ "password-store.el")
+ (delete-file-recursively "contrib")
+ (delete-file-recursively "man")
+ (delete-file-recursively "src")
+ (delete-file-recursively "tests")))
+ (add-after 'extract-el-file 'patch-executables
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "password-store.el"
+ (("\\(executable-find \"pass\"\\)")
+ (string-append
+ "\""
+ (search-input-file inputs "bin/pass")
+ "\""))))))))
+ (inputs (list password-store))
(propagated-inputs
- (list emacs-auth-source-pass emacs-s emacs-with-editor
- password-store))
+ (list emacs-auth-source-pass emacs-s emacs-with-editor))
(home-page "https://git.zx2c4.com/password-store/tree/contrib/emacs")
(synopsis "Password store (pass) support for Emacs")
(description
--
2.38.0
(
[PATCH 2/2] gnu: emacs-ivy-pass: Don't propagate password-store.
(address . 58397@debbugs.gnu.org)(name . ()(address . paren@disroot.org)
20221009165749.16619-2-paren@disroot.org
* gnu/packages/emacs-xyz.scm (emacs-ivy-pass)[propagated-inputs]
<password-store>: Delete it.
[synopsis, description]: Use @command when referring to pass.
---
gnu/packages/emacs-xyz.scm | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6f415dc7b1..27494f2a37 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -10535,23 +10535,22 @@ (define-public emacs-ivy-pass
(package
(name "emacs-ivy-pass")
(version (git-version "0.1" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ecraven/ivy-pass")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "18crb4zh2pjf0cmv3b913m9vfng27girjwfqc3mk7vqd1r5a49yk"))))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ecraven/ivy-pass")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18crb4zh2pjf0cmv3b913m9vfng27girjwfqc3mk7vqd1r5a49yk"))))
(build-system emacs-build-system)
- (propagated-inputs
- (list emacs-ivy emacs-password-store password-store))
+ (propagated-inputs (list emacs-ivy emacs-password-store))
(home-page "https://github.com/ecraven/ivy-pass")
- (synopsis "Ivy interface for password store (pass)")
- (description "This package provides an Ivy interface for working with
-the password store @code{pass}.")
+ (synopsis "Ivy interface to @code{pass}")
+ (description
+ "This package provides an Ivy interface for working with the
+password store (@command{pass}) in Emacs.")
(license license:gpl3))))
(define-public emacs-ivy-yasnippet
--
2.38.0
N
N
Nicolas Goaziou wrote on 10 Oct 2022 18:12
Re: [bug#58397] [PATCH 1/2] gnu: emacs-password-store: Refer directly to password-store.
(name . ( via Guix-patches via)(address . guix-patches@gnu.org)
87czazvesm.fsf@nicolasgoaziou.fr
Hello,

"( via Guix-patches" via <guix-patches@gnu.org> writes:

Thank you. Applied with the following change.

Toggle quote (9 lines)
> + (add-after 'extract-el-file 'patch-executables
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "password-store.el"
> + (("\\(executable-find \"pass\"\\)")
> + (string-append
> + "\""
> + (search-input-file inputs "bin/pass")
> + "\""))))))))

I used `emacs-substitute-variable' instead of substitute*.

Regards,
--
Nicolas Goaziou
(
(address . 58397-done@debbugs.gnu.org)
CNIDRSB3125J.26SW6MRC5SQGV@guix-framework
Hey Nicolas,

On Mon Oct 10, 2022 at 5:12 PM BST, Nicolas Goaziou wrote:
Toggle quote (2 lines)
> Thank you. Applied with the following change.

Thanks! :)

Toggle quote (2 lines)
> I used `emacs-substitute-variable' instead of substitute*.

Ah, I didn't know that existed; thanks! I've never touched Emacs packaging
before.

-- (
N
N
Nicolas Goaziou wrote on 10 Oct 2022 18:27
Re: [bug#58397] [PATCH 2/2] gnu: emacs-ivy-pass: Don't propagate password-store.
(name . ( via Guix-patches via)(address . guix-patches@gnu.org)
878rlnve3m.fsf@nicolasgoaziou.fr
Hello,

"( via Guix-patches" via <guix-patches@gnu.org> writes:

Toggle quote (4 lines)
> * gnu/packages/emacs-xyz.scm (emacs-ivy-pass)[propagated-inputs]
> <password-store>: Delete it.
> [synopsis, description]: Use @command when referring to pass.

Thank you. Applied with the following changes.

Toggle quote (20 lines)
> - (source
> - (origin
> - (method git-fetch)
> - (uri (git-reference
> - (url "https://github.com/ecraven/ivy-pass")
> - (commit commit)))
> - (file-name (git-file-name name version))
> - (sha256
> - (base32
> - "18crb4zh2pjf0cmv3b913m9vfng27girjwfqc3mk7vqd1r5a49yk"))))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/ecraven/ivy-pass")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "18crb4zh2pjf0cmv3b913m9vfng27girjwfqc3mk7vqd1r5a49yk"))))

This change is not warranted, so I removed it.

Toggle quote (5 lines)
> (build-system emacs-build-system)
> - (propagated-inputs
> - (list emacs-ivy emacs-password-store password-store))
> + (propagated-inputs (list emacs-ivy emacs-password-store))

I think the newline removal isn't either.

Toggle quote (9 lines)
> - (synopsis "Ivy interface for password store (pass)")
> - (description "This package provides an Ivy interface for working with
> -the password store @code{pass}.")
> + (synopsis "Ivy interface to @code{pass}")
> + (description
> + "This package provides an Ivy interface for working with the
> +password store (@command{pass}) in Emacs.")

I used @code here too, since you're probably referring to the project's
name.

Regards,
--
Nicolas Goaziou
?