unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Patch] Add keychain.
@ 2016-09-22  6:07 james
  0 siblings, 0 replies; 6+ messages in thread
From: james @ 2016-09-22  6:07 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

Hello,

This is my first patch ;)
Feedback and suggestions appreciated.

Thanks,
James Richardson
https://jamesetechnotes.com

[-- Attachment #2: 0001-gnu-add-keychain.patch --]
[-- Type: application/octet-stream, Size: 4660 bytes --]

From aa92429df463ac197a0edcd90aa30ebf8c064ac0 Mon Sep 17 00:00:00 2001
From: James Richardson <james@jamestechnotes.com>
Date: Thu, 22 Sep 2016 01:44:28 -0400
Subject: [PATCH] gnu: add keychain

* gnu/local.mk: Include gnu/packages/keychain.scm.
* gnu/packages/keychain.scm: Add new file.
* gnu/packages/keychain.scm: (keychain): New variable.
---
 gnu/local.mk              |  1 +
 gnu/packages/keychain.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/keychain.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index a756638..3b814f4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -191,6 +191,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/kde.scm              \
   %D%/packages/kde-frameworks.scm		\
   %D%/packages/key-mon.scm			\
+  %D%/packages/keychain.scm			\
   %D%/packages/kodi.scm				\
   %D%/packages/language.scm			\
   %D%/packages/ldc.scm				\
diff --git a/gnu/packages/keychain.scm b/gnu/packages/keychain.scm
new file mode 100644
index 0000000..7842fb4
--- /dev/null
+++ b/gnu/packages/keychain.scm
@@ -0,0 +1,79 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 James Richardson <james@jamestechnotes.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages keychain)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system trivial)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression))
+
+(define-public keychain
+  (package
+    (name "keychain")
+    (version "2.8.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append
+            "http://www.funtoo.org/distfiles/keychain/keychain-"
+            version ".tar.bz2"))
+      (sha256
+       (base32
+        "009kmqrwjp1a2a5iyhbnjm2fbiig7xh5c6p8a6ls25kn54r5i2bl"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((bin-dir (string-append %output "/bin"))
+                         (man1-dir (string-append %output "/share/man/man1"))
+                         (tar (string-append
+                               (assoc-ref %build-inputs "tar")
+                               "/bin/tar"))
+                         (bzip2 (assoc-ref %build-inputs "bzip2"))
+                         (source  (assoc-ref %build-inputs "source")))
+                     (mkdir-p bin-dir)
+                     (mkdir-p man1-dir)
+                     (setenv "PATH" (string-append bzip2 "/bin"))
+                     (system* tar "xfv" source)
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain.1")
+                                (string-append man1-dir "/keychain.1"))
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain")
+                                (string-append bin-dir "/keychain"))))))
+    (native-inputs `(("bzip2" ,bzip2)
+                     ("tar" ,tar)
+                     ("source" ,source)))
+    (synopsis "Key manager for OpenSSH")
+    (description
+     "Keychain is an OpenSSH key manager, typically run from
+~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
+otherwise it starts one.  It saves the ssh-agent environment variables to
+~/.keychain/$HOSTNAME-sh, so that subsequent logins and
+non-interactive shells such as cron jobs can source the file and make
+passwordless ssh connections.  In addition, when keychain runs, it
+verifies that the key files specified on the command-line are known to
+ssh-agent, otherwise it loads them, prompting you for a password
+if necessary.")
+    (home-page "http://www.funtoo.org/Keychain")
+    (license license:gpl2)))
+
-- 
2.9.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Patch] Add keychain.
@ 2016-09-22 10:03 james
  0 siblings, 0 replies; 6+ messages in thread
From: james @ 2016-09-22 10:03 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

Hello,

This is my first patch ;)
Feedback and suggestions appreciated.

Thanks,
James Richardson
https://jamesetechnotes.com

[-- Attachment #2: 0001-gnu-add-keychain.patch --]
[-- Type: application/octet-stream, Size: 4660 bytes --]

From aa92429df463ac197a0edcd90aa30ebf8c064ac0 Mon Sep 17 00:00:00 2001
From: James Richardson <james@jamestechnotes.com>
Date: Thu, 22 Sep 2016 01:44:28 -0400
Subject: [PATCH] gnu: add keychain

* gnu/local.mk: Include gnu/packages/keychain.scm.
* gnu/packages/keychain.scm: Add new file.
* gnu/packages/keychain.scm: (keychain): New variable.
---
 gnu/local.mk              |  1 +
 gnu/packages/keychain.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/keychain.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index a756638..3b814f4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -191,6 +191,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/kde.scm              \
   %D%/packages/kde-frameworks.scm		\
   %D%/packages/key-mon.scm			\
+  %D%/packages/keychain.scm			\
   %D%/packages/kodi.scm				\
   %D%/packages/language.scm			\
   %D%/packages/ldc.scm				\
diff --git a/gnu/packages/keychain.scm b/gnu/packages/keychain.scm
new file mode 100644
index 0000000..7842fb4
--- /dev/null
+++ b/gnu/packages/keychain.scm
@@ -0,0 +1,79 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 James Richardson <james@jamestechnotes.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages keychain)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system trivial)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression))
+
+(define-public keychain
+  (package
+    (name "keychain")
+    (version "2.8.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append
+            "http://www.funtoo.org/distfiles/keychain/keychain-"
+            version ".tar.bz2"))
+      (sha256
+       (base32
+        "009kmqrwjp1a2a5iyhbnjm2fbiig7xh5c6p8a6ls25kn54r5i2bl"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((bin-dir (string-append %output "/bin"))
+                         (man1-dir (string-append %output "/share/man/man1"))
+                         (tar (string-append
+                               (assoc-ref %build-inputs "tar")
+                               "/bin/tar"))
+                         (bzip2 (assoc-ref %build-inputs "bzip2"))
+                         (source  (assoc-ref %build-inputs "source")))
+                     (mkdir-p bin-dir)
+                     (mkdir-p man1-dir)
+                     (setenv "PATH" (string-append bzip2 "/bin"))
+                     (system* tar "xfv" source)
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain.1")
+                                (string-append man1-dir "/keychain.1"))
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain")
+                                (string-append bin-dir "/keychain"))))))
+    (native-inputs `(("bzip2" ,bzip2)
+                     ("tar" ,tar)
+                     ("source" ,source)))
+    (synopsis "Key manager for OpenSSH")
+    (description
+     "Keychain is an OpenSSH key manager, typically run from
+~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
+otherwise it starts one.  It saves the ssh-agent environment variables to
+~/.keychain/$HOSTNAME-sh, so that subsequent logins and
+non-interactive shells such as cron jobs can source the file and make
+passwordless ssh connections.  In addition, when keychain runs, it
+verifies that the key files specified on the command-line are known to
+ssh-agent, otherwise it loads them, prompting you for a password
+if necessary.")
+    (home-page "http://www.funtoo.org/Keychain")
+    (license license:gpl2)))
+
-- 
2.9.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Patch]: add keychain
@ 2016-09-22 11:46 James Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: James Richardson @ 2016-09-22 11:46 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: add keychain patch --]
[-- Type: text/x-patch, Size: 4660 bytes --]

From aa92429df463ac197a0edcd90aa30ebf8c064ac0 Mon Sep 17 00:00:00 2001
From: James Richardson <james@jamestechnotes.com>
Date: Thu, 22 Sep 2016 01:44:28 -0400
Subject: [PATCH] gnu: add keychain

* gnu/local.mk: Include gnu/packages/keychain.scm.
* gnu/packages/keychain.scm: Add new file.
* gnu/packages/keychain.scm: (keychain): New variable.
---
 gnu/local.mk              |  1 +
 gnu/packages/keychain.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/keychain.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index a756638..3b814f4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -191,6 +191,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/kde.scm              \
   %D%/packages/kde-frameworks.scm		\
   %D%/packages/key-mon.scm			\
+  %D%/packages/keychain.scm			\
   %D%/packages/kodi.scm				\
   %D%/packages/language.scm			\
   %D%/packages/ldc.scm				\
diff --git a/gnu/packages/keychain.scm b/gnu/packages/keychain.scm
new file mode 100644
index 0000000..7842fb4
--- /dev/null
+++ b/gnu/packages/keychain.scm
@@ -0,0 +1,79 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 James Richardson <james@jamestechnotes.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages keychain)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system trivial)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression))
+
+(define-public keychain
+  (package
+    (name "keychain")
+    (version "2.8.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append
+            "http://www.funtoo.org/distfiles/keychain/keychain-"
+            version ".tar.bz2"))
+      (sha256
+       (base32
+        "009kmqrwjp1a2a5iyhbnjm2fbiig7xh5c6p8a6ls25kn54r5i2bl"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((bin-dir (string-append %output "/bin"))
+                         (man1-dir (string-append %output "/share/man/man1"))
+                         (tar (string-append
+                               (assoc-ref %build-inputs "tar")
+                               "/bin/tar"))
+                         (bzip2 (assoc-ref %build-inputs "bzip2"))
+                         (source  (assoc-ref %build-inputs "source")))
+                     (mkdir-p bin-dir)
+                     (mkdir-p man1-dir)
+                     (setenv "PATH" (string-append bzip2 "/bin"))
+                     (system* tar "xfv" source)
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain.1")
+                                (string-append man1-dir "/keychain.1"))
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain")
+                                (string-append bin-dir "/keychain"))))))
+    (native-inputs `(("bzip2" ,bzip2)
+                     ("tar" ,tar)
+                     ("source" ,source)))
+    (synopsis "Key manager for OpenSSH")
+    (description
+     "Keychain is an OpenSSH key manager, typically run from
+~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
+otherwise it starts one.  It saves the ssh-agent environment variables to
+~/.keychain/$HOSTNAME-sh, so that subsequent logins and
+non-interactive shells such as cron jobs can source the file and make
+passwordless ssh connections.  In addition, when keychain runs, it
+verifies that the key files specified on the command-line are known to
+ssh-agent, otherwise it loads them, prompting you for a password
+if necessary.")
+    (home-page "http://www.funtoo.org/Keychain")
+    (license license:gpl2)))
+
-- 
2.9.2


[-- Attachment #2: Type: text/plain, Size: 157 bytes --]


This is my first patch. Feedback, suggestions welcomed.

I'll have more coming as I add softwares I use that aren't included yet.

Thanks,
James Richardson

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Patch] add keychain
@ 2016-09-22 12:10 James Richardson
  2016-09-23 10:33 ` Hartmut Goebel
  0 siblings, 1 reply; 6+ messages in thread
From: James Richardson @ 2016-09-22 12:10 UTC (permalink / raw)
  To: guix-devel@gnu.org

Let's try inline as attachements seem to not work.

Feedback appreciated as this is my first submission ;)

From aa92429df463ac197a0edcd90aa30ebf8c064ac0 Mon Sep 17 00:00:00 2001
From: James Richardson <james@jamestechnotes.com>
Date: Thu, 22 Sep 2016 01:44:28 -0400
Subject: [PATCH] gnu: add keychain

* gnu/local.mk: Include gnu/packages/keychain.scm.
* gnu/packages/keychain.scm: Add new file.
* gnu/packages/keychain.scm: (keychain): New variable.
---
 gnu/local.mk              |  1 +
 gnu/packages/keychain.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/keychain.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index a756638..3b814f4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -191,6 +191,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/kde.scm              \
   %D%/packages/kde-frameworks.scm		\
   %D%/packages/key-mon.scm			\
+  %D%/packages/keychain.scm			\
   %D%/packages/kodi.scm				\
   %D%/packages/language.scm			\
   %D%/packages/ldc.scm				\
diff --git a/gnu/packages/keychain.scm b/gnu/packages/keychain.scm
new file mode 100644
index 0000000..7842fb4
--- /dev/null
+++ b/gnu/packages/keychain.scm
@@ -0,0 +1,79 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 James Richardson <james@jamestechnotes.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages keychain)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system trivial)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression))
+
+(define-public keychain
+  (package
+    (name "keychain")
+    (version "2.8.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append
+            "http://www.funtoo.org/distfiles/keychain/keychain-"
+            version ".tar.bz2"))
+      (sha256
+       (base32
+        "009kmqrwjp1a2a5iyhbnjm2fbiig7xh5c6p8a6ls25kn54r5i2bl"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((bin-dir (string-append %output "/bin"))
+                         (man1-dir (string-append %output "/share/man/man1"))
+                         (tar (string-append
+                               (assoc-ref %build-inputs "tar")
+                               "/bin/tar"))
+                         (bzip2 (assoc-ref %build-inputs "bzip2"))
+                         (source  (assoc-ref %build-inputs "source")))
+                     (mkdir-p bin-dir)
+                     (mkdir-p man1-dir)
+                     (setenv "PATH" (string-append bzip2 "/bin"))
+                     (system* tar "xfv" source)
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain.1")
+                                (string-append man1-dir "/keychain.1"))
+                     (copy-file (string-append ,name "-"
+                                               ,version "/keychain")
+                                (string-append bin-dir "/keychain"))))))
+    (native-inputs `(("bzip2" ,bzip2)
+                     ("tar" ,tar)
+                     ("source" ,source)))
+    (synopsis "Key manager for OpenSSH")
+    (description
+     "Keychain is an OpenSSH key manager, typically run from
+~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
+otherwise it starts one.  It saves the ssh-agent environment variables to
+~/.keychain/$HOSTNAME-sh, so that subsequent logins and
+non-interactive shells such as cron jobs can source the file and make
+passwordless ssh connections.  In addition, when keychain runs, it
+verifies that the key files specified on the command-line are known to
+ssh-agent, otherwise it loads them, prompting you for a password
+if necessary.")
+    (home-page "http://www.funtoo.org/Keychain")
+    (license license:gpl2)))
+
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Patch] add keychain
  2016-09-22 12:10 [Patch] add keychain James Richardson
@ 2016-09-23 10:33 ` Hartmut Goebel
  2016-09-24 17:24   ` James Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Hartmut Goebel @ 2016-09-23 10:33 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3598 bytes --]

Am 22.09.2016 um 14:10 schrieb James Richardson:
> * gnu/packages/keychain.scm: Add new file.

I suggest putting this into some other file, e.g. crypto.scm or ssh.scm.
Otherwise we have a file for a single package.

> * gnu/packages/keychain.scm: (keychain): New variable.

If you stay with the separate file, this line is not needed.

> +       #:builder (begin
> +                   (use-modules (guix build utils))
> +                   (let ((bin-dir (string-append %output "/bin"))
> +                         (man1-dir (string-append %output "/share/man/man1"))
> +                         (tar (string-append
> +                               (assoc-ref %build-inputs "tar")
> +                               "/bin/tar"))
> +                         (bzip2 (assoc-ref %build-inputs "bzip2"))
You may want to have a look at audio.scm:freepats for a bit shorter and
more obvious code.

> +                     (mkdir-p bin-dir)
> +                     (mkdir-p man1-dir)
> +                     (setenv "PATH" (string-append bzip2 "/bin"))
> +                     (system* tar "xfv" source)

Please unpack the source first, the code is more obvious then.
> +                     (copy-file (string-append ,name "-"
> +                                               ,version "/keychain.1")
If you run this using "with-directory-excursion", the code is more
obvious and simpler.
> +                                (string-append man1-dir "/keychain.1"))
> +                     (copy-file (string-append ,name "-"
> +                                               ,version "/keychain")
> +                                (string-append bin-dir "/keychain"))))))

You can use install-file and save the make-p above.
> +    (native-inputs `(("bzip2" ,bzip2)
> +                     ("tar" ,tar)

Please warp like this:

+    (native-inputs
+     `(("bzip2" ,bzip2)
+      ("tar" ,tar)


> +                     ("source" ,source)))


No need for listing the source here.

> +    (synopsis "Key manager for OpenSSH")

Not only for *open*ssh, but for other implementations, too. And für
GnuPG-Agent, Maybe even talk abpout the Agent in the synopsis.

Keychains itself says it is a "agent manager".

> +    (description
> +     "Keychain is an OpenSSH key manager, typically run from
> +~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
> +otherwise it starts one.  It saves the ssh-agent environment variables to
> +~/.keychain/$HOSTNAME-sh, so that subsequent logins and
> +non-interactive shells such as cron jobs can source the file and make
> +passwordless ssh connections.  In addition, when keychain runs, it
> +verifies that the key files specified on the command-line are known to
> +ssh-agent, otherwise it loads them, prompting you for a password
> +if necessary.")


The text above is a details workflow description. For me the text form
the keychain.spec-file is more meaningful. Maybe you want to combine them?

    Keychain is a manager for OpenSSH, ssh.com, Sun SSH and GnuPG agents.
    It acts as a front-end to the agents, allowing you to easily have one
    long-running agent process per system, rather than per login session.
    This reduces the number of times you need to enter your passphrase
    from once per new login session to once every time your local machine
    is rebooted.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


[-- Attachment #2: Type: text/html, Size: 5403 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch] add keychain
  2016-09-23 10:33 ` Hartmut Goebel
@ 2016-09-24 17:24   ` James Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: James Richardson @ 2016-09-24 17:24 UTC (permalink / raw)
  To: guix-devel


Hartmut Goebel writes:

Thank you for the feedback! Much appreciated!

> Am 22.09.2016 um 14:10 schrieb James Richardson:
>> * gnu/packages/keychain.scm: Add new file.
>
> I suggest putting this into some other file, e.g. crypto.scm or ssh.scm.
> Otherwise we have a file for a single package.

I wasn't sure of the policy. I will move it to one of these files.

>
>> * gnu/packages/keychain.scm: (keychain): New variable.
>
> If you stay with the separate file, this line is not needed.
>
>> +       #:builder (begin
>> +                   (use-modules (guix build utils))
>> +                   (let ((bin-dir (string-append %output "/bin"))
>> +                         (man1-dir (string-append %output "/share/man/man1"))
>> +                         (tar (string-append
>> +                               (assoc-ref %build-inputs "tar")
>> +                               "/bin/tar"))
>> +                         (bzip2 (assoc-ref %build-inputs "bzip2"))
> You may want to have a look at audio.scm:freepats for a bit shorter and
> more obvious code.

I will take a look.

>
>> +                     (mkdir-p bin-dir)
>> +                     (mkdir-p man1-dir)
>> +                     (setenv "PATH" (string-append bzip2 "/bin"))
>> +                     (system* tar "xfv" source)
>
> Please unpack the source first, the code is more obvious then.
>> +                     (copy-file (string-append ,name "-"
>> +                                               ,version "/keychain.1")
> If you run this using "with-directory-excursion", the code is more
> obvious and simpler.
>> +                                (string-append man1-dir "/keychain.1"))
>> +                     (copy-file (string-append ,name "-"
>> +                                               ,version "/keychain")
>> +                                (string-append bin-dir "/keychain"))))))
>
> You can use install-file and save the make-p above.
>> +    (native-inputs `(("bzip2" ,bzip2)
>> +                     ("tar" ,tar)

I wasn't aware of of install-file. I will make these updates.

>
> Please warp like this:
>
> +    (native-inputs
> +     `(("bzip2" ,bzip2)
> +      ("tar" ,tar)
>
>
>> +                     ("source" ,source)))
>
>
> No need for listing the source here.
>

I will work on the wording.

>> +    (synopsis "Key manager for OpenSSH")
>
> Not only for *open*ssh, but for other implementations, too. And für
> GnuPG-Agent, Maybe even talk abpout the Agent in the synopsis.
>
> Keychains itself says it is a "agent manager".
>
>> +    (description
>> +     "Keychain is an OpenSSH key manager, typically run from
>> +~/.bash_profile.  When keychain is run, it checks for a running ssh-agent,
>> +otherwise it starts one.  It saves the ssh-agent environment variables to
>> +~/.keychain/$HOSTNAME-sh, so that subsequent logins and
>> +non-interactive shells such as cron jobs can source the file and make
>> +passwordless ssh connections.  In addition, when keychain runs, it
>> +verifies that the key files specified on the command-line are known to
>> +ssh-agent, otherwise it loads them, prompting you for a password
>> +if necessary.")
>
>
> The text above is a details workflow description. For me the text form
> the keychain.spec-file is more meaningful. Maybe you want to combine them?
>
>     Keychain is a manager for OpenSSH, ssh.com, Sun SSH and GnuPG agents.
>     It acts as a front-end to the agents, allowing you to easily have one
>     long-running agent process per system, rather than per login session.
>     This reduces the number of times you need to enter your passphrase
>     from once per new login session to once every time your local machine
>     is rebooted.

I'll try to have these changes in the next few days. Thank you for the
review.

--
James Richardson

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-24 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22 12:10 [Patch] add keychain James Richardson
2016-09-23 10:33 ` Hartmut Goebel
2016-09-24 17:24   ` James Richardson
  -- strict thread matches above, loose matches on Subject: below --
2016-09-22 11:46 [Patch]: " James Richardson
2016-09-22 10:03 [Patch] Add keychain james
2016-09-22  6:07 james

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).