Subject: bug#26548: closed (Re: bug#26548: [PATCH v2 2/2] install: Enable SSH in installation image.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 17 May 2017 23:02:02 +0000

Your bug report

#26548: [PATCH] install: Enable SSH in installation image.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26548: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26548
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26548: [PATCH v2 2/2] install: Enable SSH in installation image.
From: Marius Bakke <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Thu, 18 May 2017 01:01:19 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Ludovic Courtès <[email-masked]> writes:

> Marius Bakke <[email-masked]> skribis:
>
>> * gnu/system/install.scm (%installation-services): Add OPENSSH-SERVICE.
>> * doc/guix.texi (Preparing for Installation)[Networking]: Document it.
>
> [...]
>
>> +@cindex installing over SSH
>> +From here you can proceed to do the rest of the installation remotely
>> +by starting an SSH server:
>
> Maybe s/From here/If you want to, / to clarify that people are not
> required to do this?

Thanks, fixed!

> Otherwise LGTM!
>
> How does this affect:
>
>   guix size $(./pre-inst-env guix system build gnu/system/install.scm)

Before: 882.1MiB
After:  910.0MiB

"make check-system TESTS=openssh" passes. Pushed!

Subject: [PATCH] install: Enable SSH in installation image.
From: Marius Bakke <[email-masked]>
To: [email-masked]
Cc: Marius Bakke <[email-masked]>
Date: Mon, 17 Apr 2017 23:30:30 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Guix! This patch adds an SSH server to the installation image
to aid remote installations as requested in
https://lists.gnu.org/archive/html/help-guix/2017-01/msg00047.html

lsh-service depends on networking, so I pulled in a DHCP client too.
It increases the image size by about 29MiB.

* gnu/system/install.scm (%installation-services): Add DHCP-CLIENT-SERVICE
and LSH-SERVICE.
---
 gnu/system/install.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 191ccf168..95904f151 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -24,7 +24,9 @@
   #:use-module (guix store)
   #:use-module (guix monads)
   #:use-module ((guix store) #:select (%store-prefix))
+  #:use-module (gnu services networking)
   #:use-module (gnu services shepherd)
+  #:use-module (gnu services ssh)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bootloaders)
@@ -262,6 +264,17 @@ You have been warned.  Thanks for being so brave.
           ;; To facilitate copy/paste.
           (gpm-service)
 
+          ;; Add a DHCP client for networking.
+          (dhcp-client-service)
+
+          ;; Add an SSH server to facilitate remote installs.
+          (lsh-service #:port-number 22
+                       #:root-login? #t
+                       #:password-authentication? #t
+                       ;; The root account is passwordless, so make sure
+                       ;; a password is set before allowing logins.
+                       #:allow-empty-passwords? #f)
+
           ;; Since this is running on a USB stick with a unionfs as the root
           ;; file system, use an appropriate cache configuration.
           (nscd-service (nscd-configuration
-- 
2.12.2