[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 02/20: Add Goblins port infrastructure.
From: |
Juliana Sims |
Subject: |
[shepherd] 02/20: Add Goblins port infrastructure. |
Date: |
Fri, 17 Jan 2025 16:27:21 -0500 (EST) |
juli pushed a commit to branch wip-goblinsify
in repository shepherd.
commit f30dd8049ffb2ba61518523f3c9ba1da6eaf66b9
Author: Juliana Sims <juli@incana.org>
AuthorDate: Thu Oct 10 09:19:18 2024 -0400
Add Goblins port infrastructure.
* .dir-locals.el: Add Goblins helper indentation rules.
* README: Mention and explain Goblins port.
* goblins-port-manifest.scm: New file.
---
.dir-locals.el | 4 +-
README | 26 +++++++++++++
goblins-port-manifest.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 126 insertions(+), 1 deletion(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index a7bf23d..72bd154 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -15,6 +15,8 @@
(eval . (put 'with-blocked-signals 'scheme-indent-function 1))
(eval . (put 'with-process-monitor 'scheme-indent-function 0))
(eval . (put 'with-service-registry 'scheme-indent-function 0))
- (eval . (put 'with-exit-on-failure 'scheme-indent-function 1))))
+ (eval . (put 'with-exit-on-failure 'scheme-indent-function 1))
+ (eval . (put 'call-with-vat 'scheme-indent-function 1))
+ (eval . (put 'with-vat 'scheme-indent-function 1))))
(texinfo-mode . ((indent-tabs-mode . nil)
(fill-column . 72))))
diff --git a/README b/README
index 37dd3d2..0907efc 100644
--- a/README
+++ b/README
@@ -12,6 +12,32 @@ on every POSIX-like system where Guile is available.
In a previous life, the GNU Shepherd was known as GNU dmd, the
daemon-managing daemon.
+** What is this branch?
+
+This is the working branch for the port of the Shepherd to the
+[[https://spritely.institute/goblins/][Spritely Goblins]] object-capability
+security library. There is a description of this work on the
+[[https://spritely.institute/news/spritely-nlnet-grants-december-2023.html][Spritely
+blog]].
+
+*** What is the status of this branch? (may be out of date)
+
+At present, this branch is for planning and prototyping. The files
+~scratch.scm~ and ~scratch-demo.scm~ are playgrounds for exploring the
+architecture and shape of the Goblins version of Shepherd. While no commits
+are yet guaranteed to work properly, a working commit will allow you to run
+the existing code and see some interesting or informative output by:
+
+ guile scratch.scm scratch-demo.scm
+
+or
+
+ guile -l scratch.scm scratch-demo.scm
+
+If you're not in a context with Guile, Guile Goblins, and Guile Fibers
+available, you'll need to get those first. You can use
+~guix shell -m goblins-port-manifest.scm~ if you're on Guix.
+
** Requirements
The GNU Shepherd depends on the following pieces of software:
diff --git a/goblins-port-manifest.scm b/goblins-port-manifest.scm
new file mode 100644
index 0000000..3a086dc
--- /dev/null
+++ b/goblins-port-manifest.scm
@@ -0,0 +1,97 @@
+;; Development environment for Shepherd Goblins port
+(use-modules (gnu packages autotools)
+ (gnu packages flex)
+ (gnu packages gettext)
+ (gnu packages gperf)
+ (gnu packages guile)
+ (gnu packages guile-xyz)
+ (gnu packages texinfo)
+ (guix git-download)
+ (guix packages))
+
+(define (version->latest pkg rev commit)
+ (git-version (package-version pkg) rev commit))
+
+;; this isn't actually useful in this file because only Fibers is packaged with
+;; git-download and we need to drop the patches Guix provides for Fibers...
+;; it's here for future reference because this pattern comes up often
+(define (update-source-git-commit pkg name version commit hash)
+ (let ((pkg-src (package-source pkg)))
+ (origin
+ (inherit pkg-src)
+ (uri (git-reference
+ (inherit (origin-uri pkg-src))
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256 (base32 hash)))))
+
+(define guile-git
+ (let ((rev "0")
+ (commit "27feb2bfd"))
+ (package
+ (inherit guile-3.0)
+ (name "guile-git")
+ (version (version->latest guile-3.0 rev commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/guile.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1h9gl2rirvcn7jgdrv963gc0nv4p23gizm9asp4x7fi1k86l3sxr"))))
+ (native-inputs
+ (modify-inputs (package-native-inputs guile-3.0)
+ (prepend autoconf
+ automake
+ flex
+ gettext-minimal
+ gperf
+ libtool
+ texinfo-7))))))
+
+(define guile-fibers-git
+ (let ((rev "0")
+ (commit "f92e5cb"))
+ (package
+ (inherit guile-fibers)
+ (name "guile-fibers-git")
+ (version (version->latest guile-fibers rev commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wingo/fibers.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c9z9nnlf9cprx96drbkmpc01c8jv0pzp0as1ivkrvhhmflls5bv")))))))
+
+(define guile-goblins-git
+ (let ((rev "0")
+ (commit "83f79d7"))
+ (package
+ (inherit guile-goblins)
+ (name "guile-goblins-git")
+ (version (version->latest guile-goblins rev commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/spritely/guile-goblins.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hxi6l3wmg8ywgd11xn2bi54y11wrvg9rgm0blqzdkwcl6cg1ay3"))))
+ (native-inputs
+ (modify-inputs (package-native-inputs guile-3.0)
+ (prepend autoconf
+ automake
+ texinfo-7))))))
+
+;; We use the latest git commits to the main branch of each of our dependencies
+;; because we like to live dangerously
+(packages->manifest (list guile-git
+ guile-fibers-git
+ guile-goblins-git))
- [shepherd] 13/20: Incorporate Spritely feedback into design doc, (continued)
- [shepherd] 13/20: Incorporate Spritely feedback into design doc, Juliana Sims, 2025/01/17
- [shepherd] 05/20: scratch: Stub out timeout support., Juliana Sims, 2025/01/17
- [shepherd] 14/20: dir-locals: Add indentation for Goblins forms., Juliana Sims, 2025/01/17
- [shepherd] 04/20: scratch: Begin prototyping process monitoring., Juliana Sims, 2025/01/17
- [shepherd] 12/20: Incorporate more feedback into design doc, Juliana Sims, 2025/01/17
- [shepherd] 01/20: .guix-authorizations: Add juli., Juliana Sims, 2025/01/17
- [shepherd] 18/20: WIP: doc: Document new Goblins interface., Juliana Sims, 2025/01/17
- [shepherd] 11/20: Update design doc., Juliana Sims, 2025/01/17
- [shepherd] 10/20: Add design doc., Juliana Sims, 2025/01/17
- [shepherd] 19/20: WIP: support: Add resolve-vow, spawn-shepherd-vat., Juliana Sims, 2025/01/17
- [shepherd] 02/20: Add Goblins port infrastructure.,
Juliana Sims <=
- [shepherd] 06/20: scratch: Cleanup comments somewhat., Juliana Sims, 2025/01/17
- [shepherd] 15/20: Remove goblins-port-manifest.scm., Juliana Sims, 2025/01/17
- [shepherd] 07/20: scratch: First pass at service startup code., Juliana Sims, 2025/01/17
- [shepherd] 08/20: goblins port manifest: Update dependency commits, fix inputs., Juliana Sims, 2025/01/17
- [shepherd] 16/20: shepherd-package: Add goblins dependency., Juliana Sims, 2025/01/17
- [shepherd] 20/20: WIP: shepherd: Port core service actor, registry., Juliana Sims, 2025/01/17
- [shepherd] 17/20: Add test file for Goblins port., Juliana Sims, 2025/01/17
- [shepherd] 03/20: Implement service-registry demo., Juliana Sims, 2025/01/17