[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/22: system: hurd: Add openssh.
From: |
guix-commits |
Subject: |
11/22: system: hurd: Add openssh. |
Date: |
Mon, 13 Apr 2020 09:20:48 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 7efff1ecdcb41a403760429a6a1be9a10bbfbfaf
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sun Apr 12 13:56:01 2020 +0200
system: hurd: Add openssh.
* gnu/system/hurd.scm (%base-packages/hurd): Add openssh.
(cross-hurd-image): Generate sshd_config. Add sshd user.
* gnu/packages/hurd.scm (hurd-rc-script): Create host keys.
---
gnu/packages/hurd.scm | 7 +++++--
gnu/system/hurd.scm | 21 +++++++++++++++++++--
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index bbe66c0..d187996 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -349,7 +349,9 @@ boot, since this cannot be done from GNU/Linux."
;; Start the oh-so-fancy console client.
(mkdir-p "/var/run") ;for the PID file
(invoke "console" "--daemonize" "-c" "/dev/vcs"
- "-d" "vga" "-d" "pc_kbd" "-d" "generic_speaker"))))
+ "-d" "vga" "-d" "pc_kbd" "-d" "generic_speaker")
+ ;; Generate the ssh host keys.
+ (invoke "/run/current-system/profile/bin/ssh-keygen" "-A"))))
;; FIXME: We want the program to use the cross-compiled Guile when
;; cross-compiling. But why do we need to be explicit here?
@@ -429,7 +431,8 @@ fsysopts / --writable
# MAKEDEV relies on pipes so this needs to be set up.
settrans -c /servers/socket/1 /hurd/pflocal
-(cd /dev; MAKEDEV -D /dev std vcs tty{1,2,3,4,5,6})\n")))
+(cd /dev; MAKEDEV -D /dev std vcs tty{1,2,3,4,5,6})
+(cd /dev; MAKEDEV -D /dev ptyp{0,1,2,3})\n")))
(substitute* "daemons/runsystem.hurd.sh"
(("export PATH")
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index bf74542..4782114 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -31,6 +31,7 @@
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages hurd)
#:use-module (gnu packages package-management)
+ #:use-module (gnu packages ssh)
#:use-module (gnu system vm)
#:export (cross-hurd-image))
@@ -54,7 +55,7 @@
(define %base-packages/hurd
(list hurd bash coreutils file findutils grep sed
guile-3.0 guile-colorized guile-readline guix
- net-base inetutils))
+ net-base inetutils openssh))
(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
"Return a cross-built GNU/Hurd image."
@@ -111,6 +112,7 @@ menuentry \"GNU\" {
(plain-file "passwd"
"root:x:0:0:root:/root:/bin/sh
guixbuilder:x:1:1:guixbuilder:/var/empty:/bin/no-sh
+sshd:x:2:2:sshd:/var/empty:/bin/no-sh
"))
(define group
@@ -120,7 +122,7 @@ guixbuilder:x:1:1:guixbuilder:/var/empty:/bin/no-sh
(define shadow
(plain-file "shadow"
- "root::0:0:0:0:::
+ "root::17873::::::
"))
(define etc-profile
@@ -136,6 +138,18 @@ if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
. \"$GUIX_PROFILE/etc/profile\"
fi\n"))
+ (define sshd_config
+ (plain-file "sshd_config"
+ "# Generated by '(gnu system hurd)'
+Port 22
+PermitRootLogin yes
+PermitEmptyPasswords yes
+PasswordAuthentication yes
+PubkeyAuthentication yes
+PidFile /var/run/sshd.pid
+PrintLastLog yes
+LogLevel INFO\n"))
+
(define build.sh
(plain-file "build.sh"
"#! /bin/sh
@@ -210,6 +224,8 @@ guix build -e '(@@ (gnu packages commencement)
gnu-make-boot0)' --fallback --no-
"i586-pc-gnu"))
hurd)
"/etc/ttys"))
+ (directory "/etc/ssh")
+ ("/etc/ssh/sshd_config" -> ,sshd_config)
("/bin/sh" -> ,(file-append (with-parameters ((%current-target-system
"i586-pc-gnu"))
bash)
@@ -225,6 +241,7 @@ guix build -e '(@@ (gnu packages commencement)
gnu-make-boot0)' --fallback --no-
("group" ,group)
("etc-profile" ,etc-profile)
("shadow" ,shadow)
+ ("sshd_config" ,sshd_config)
("build.sh" ,build.sh))
#:copy-inputs? #t
#:os system-profile
- 07/22: gnu: guix: Run `make update-guix-package'., (continued)
- 07/22: gnu: guix: Run `make update-guix-package'., guix-commits, 2020/04/13
- 10/22: gnu: hurd: Use default Qemu guest ip: 10.0.2.15., guix-commits, 2020/04/13
- 03/22: HACK build.sh, 2GiB disk., guix-commits, 2020/04/13
- 05/22: Revert "records: Have ABI check work well for cross-compilation.", guix-commits, 2020/04/13
- 02/22: system: hurd: Add guix., guix-commits, 2020/04/13
- 06/22: REMOVEME gnu: guix: Bugfix for cross compiling to the Hurd., guix-commits, 2020/04/13
- 04/22: Revert "compile: Run the load phase within 'with-target'.", guix-commits, 2020/04/13
- 08/22: build.sh: Disable daemon deduplication; builds gnu-make-boot0!, guix-commits, 2020/04/13
- 09/22: system: hurd: Bump image size to 10GiB., guix-commits, 2020/04/13
- 12/22: system: hurd: Add the Shepherd., guix-commits, 2020/04/13
- 11/22: system: hurd: Add openssh.,
guix-commits <=
- 15/22: DRAFT system: hurd: Start the Shepherd., guix-commits, 2020/04/13
- 18/22: services: Add hurd-ttys-service-type., guix-commits, 2020/04/13
- 14/22: gnu: python: Build fix for the Hurd., guix-commits, 2020/04/13
- 20/22: services: Register guix-daemon-service as a hurd service., guix-commits, 2020/04/13
- 16/22: services: Add hurd., guix-commits, 2020/04/13
- 13/22: gnu: coreutils: Mark three more tests XFAIL on the Hurd., guix-commits, 2020/04/13
- 19/22: services: Add hurd-user-services-service-type., guix-commits, 2020/04/13
- 21/22: system: hurd: Initial (gnu services) generated shepherd.conf., guix-commits, 2020/04/13
- 17/22: services: Add hurd-console-service-type., guix-commits, 2020/04/13
- 22/22: HACK use uncompiled .scm for shepherd, guix-commits, 2020/04/13