GNU bug report logs - #47392
[PATCH 0/2] Add Laminar.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Thu, 25 Mar 2021 15:24:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47392 in the body.
You can then email your comments to 47392 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Thu, 25 Mar 2021 15:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 25 Mar 2021 15:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] Add Laminar.
Date: Thu, 25 Mar 2021 15:23:02 +0000
[Message part 1 (text/plain, inline)]
I've wrote these patches a long while ago, and I've been using Laminar
too, since Laminar fills a role in the patches testing setup I've been
working on.

I was holding off on submitting them until more could be done about the
JavaScript Laminar uses, but merging these patches would be useful, and
I think the line of including non-source JavaScript in packages has
already been crossed.


Christopher Baines (2):
  gnu: Add laminar.
  services: Add Laminar.

 doc/guix.texi       |  54 ++++++++++++++++++-
 gnu/packages/ci.scm | 104 +++++++++++++++++++++++++++++++++++
 gnu/services/ci.scm | 128 +++++++++++++++++++++++++++++++++++++++++++
 gnu/tests/ci.scm    | 129 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 413 insertions(+), 2 deletions(-)
 create mode 100644 gnu/services/ci.scm
 create mode 100644 gnu/tests/ci.scm
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Thu, 25 Mar 2021 15:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 47392 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add laminar.
Date: Thu, 25 Mar 2021 15:26:11 +0000
* gnu/packages/ci.scm (laminar): New variable.
---
 gnu/packages/ci.scm | 104 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index bafe997c82..4e13d01715 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -25,10 +25,13 @@
   #:use-module ((guix licenses) #:prefix l:)
   #:use-module (gnu packages)
   #:use-module (guix packages)
+  #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix download)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -40,11 +43,14 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-compression)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages serialization)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu))
 
 (define-public cuirass
@@ -170,3 +176,101 @@
 intended as a replacement for Hydra.")
       (home-page "https://www.gnu.org/software/guix/")
       (license l:gpl3+))))
+
+(define-public laminar
+  (package
+    (name "laminar")
+    (version "1.0")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://github.com/ohwgiles/laminar/archive/"
+                                 version
+                                 ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "11m6h3rdmj2rsmsryy7r40gqccj4gg1cnqwy6blscs87gx4s423g"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ; TODO Can't build tests
+       #:configure-flags
+       (list "-DCMAKE_CXX_STANDARD=17"
+             ;; "-DBUILD_TESTS=true" TODO: objcopy: js/stPskyUS: can't add
+             ;; section '.note.GNU-stack': file format not recognized
+             (string-append "-DLAMINAR_VERSION=" ,version))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-CMakeLists.txt
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("file\\(DOWNLOAD.*\n$")
+                "# file download removed by Guix --")
+               (("install\\(FILES etc/laminar.service DESTINATION \\$\\{SYSTEMD\\_UNITDIR\\}\\)")
+                "")
+               (("install\\(FILES \\$\\{CMAKE\\_CURRENT\\_BINARY\\_DIR\\}\\/laminar\\.service DESTINATION \\$\\{SYSTEMD\\_UNITDIR\\}\\)")
+                "")
+               (("install\\(FILES etc/laminar\\.conf DESTINATION \\/etc\\)") "")
+               (("\\/usr\\/") ""))
+             #t))
+         (add-after 'configure 'copy-in-javascript-and-css
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (mkdir-p "../build/js")
+             (for-each (lambda (file)
+                         (copy-file
+                          file
+                          (string-append
+                           "../build/js/" (strip-store-file-name file))))
+                       (map (lambda (input)
+                              (assoc-ref inputs input))
+                            '("vue.min.js"
+                              "vue-router.min.js"
+                              "ansi_up.js"
+                              "Chart.min.js")))
+             #t)))))
+    (inputs
+     `(("capnproto" ,capnproto)
+       ("rapidjson" ,rapidjson)
+       ("sqlite" ,sqlite)
+       ("boost" ,boost)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("googletest" ,googletest)
+
+       ("vue.min.js"
+        ,(origin (method url-fetch)
+                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
+                                     "vue/2.6.12/vue.min.js"))
+                 (sha256
+                  (base32
+                   "01zklp5cyik65dfn64m8h2y2dxzgbyzgmbf99y7fwgnf0155r7pq"))))
+       ("vue-router.min.js"
+        ,(origin (method url-fetch)
+                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
+                                     "vue-router/3.4.8/vue-router.min.js"))
+                 (sha256
+                  (base32
+                   "07gx7znb30rk1z7w6ca7dlfjp44q12bbq6jghwfm27mf6psa80as"))))
+       ("ansi_up.js"
+        ,(origin (method url-fetch)
+                 (uri (string-append "https://raw.githubusercontent.com/"
+                                     "drudru/ansi_up/v1.3.0/ansi_up.js"))
+                 (sha256
+                  (base32
+                   "1993dywxqi2ylnxybwk7m0s0bg2bq7kfllpyr0s8ck6chd0p8i6r"))))
+       ("Chart.min.js"
+        ,(origin (method url-fetch)
+                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
+                                     "Chart.js/2.7.2/Chart.min.js"))
+                 (sha256
+                  (base32
+                   "1jh4h12qchsba03dx03mrvs4r8g9qfjn56xm56jqzgqf7r209xq9"))))))
+    (synopsis "Lightweight Continuous Integration service")
+    (description
+     "Laminar is a lightweight and modular Continuous Integration service.  It
+doesn't have a configuration web UI instead uses version-controllable
+configuration files and scripts.
+
+Laminar encourages the use of existing GNU/Linux tools such as bash and cron
+instead of reinventing them.")
+    (home-page "https://laminar.ohwg.net/")
+    (license l:gpl3+)))
-- 
2.30.1





Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Thu, 25 Mar 2021 15:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 47392 <at> debbugs.gnu.org
Subject: [PATCH 2/2] services: Add Laminar.
Date: Thu, 25 Mar 2021 15:26:12 +0000
* gnu/services/ci.scm: New file.
* gnu/tests/ci.scm: New file.
* doc/guix.texi (Laminar): Document the Laminar service.
---
 doc/guix.texi       |  54 ++++++++++++++++++-
 gnu/services/ci.scm | 128 +++++++++++++++++++++++++++++++++++++++++++
 gnu/tests/ci.scm    | 129 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 309 insertions(+), 2 deletions(-)
 create mode 100644 gnu/services/ci.scm
 create mode 100644 gnu/tests/ci.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 74f3fbd299..bd087dae05 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -342,7 +342,7 @@ Services
 * DNS Services::                DNS daemons.
 * VPN Services::                VPN daemons.
 * Network File System::         NFS related services.
-* Continuous Integration::      The Cuirass service.
+* Continuous Integration::      Cuirass and Laminar services.
 * Power Management Services::   Extending battery life.
 * Audio Services::              The MPD.
 * Virtualization Services::     Virtualization services.
@@ -14798,7 +14798,7 @@ declaration.
 * DNS Services::                DNS daemons.
 * VPN Services::                VPN daemons.
 * Network File System::         NFS related services.
-* Continuous Integration::      The Cuirass service.
+* Continuous Integration::      Cuirass and Laminar services.
 * Power Management Services::   Extending battery life.
 * Audio Services::              The MPD.
 * Virtualization Services::     Virtualization services.
@@ -27301,6 +27301,56 @@ the store items being published.
 @end table
 @end deftp
 
+@subsubheading Laminar
+
+@uref{https://laminar.ohwg.net/, Laminar} is a lightweight and modular
+Continuous Integration service.  It doesn't have a configuration web UI
+instead uses version-controllable configuration files and scripts.
+
+Laminar encourages the use of existing GNU/Linux tools such as bash and
+cron instead of reinventing them.
+
+@defvr {Scheme Procedure} laminar-service-type
+The type of the Laminar service.  Its value must be a
+@code{laminar-configuration} object, as described below.
+@end defvr
+
+@deftp {Data Type} laminar-configuration
+Data type representing the configuration of Laminar.
+
+@table @asis
+@item @code{laminar} (default: @code{laminar})
+The Laminar package to use.
+
+@item @code{home-directory} (default: @code{"/var/lib/laminar"})
+The directory for job configurations and run directories.
+
+@item @code{bind-http} (default: @code{"*:8080"})
+The interface/port or unix socket on which laminard should listen for
+incoming connections to the web frontend.
+
+@item @code{bind-rpc} (default: @code{"unix-abstract:laminar"})
+The interface/port or unix socket on which laminard should listen for
+incoming commands such as build triggers.
+
+@item @code{title} (default: @code{"Laminar"})
+The page title to show in the web frontend.
+
+@item @code{keep-rundirs} (default: @code{0})
+Set to an integer defining how many rundirs to keep per job.  The
+lowest-numbered ones will be deleted.  The default is 0, meaning all run
+dirs will be immediately deleted.
+
+@item @code{archive-url} (default: @code{#f})
+The web frontend served by laminard will use this URL to form links to
+artefacts archived jobs.
+
+@item @code{base-url} (default: @code{#f})
+Base URL to use for links to laminar itself.
+
+@end table
+@end deftp
+
 @node Power Management Services
 @subsection Power Management Services
 
diff --git a/gnu/services/ci.scm b/gnu/services/ci.scm
new file mode 100644
index 0000000000..400980dcd4
--- /dev/null
+++ b/gnu/services/ci.scm
@@ -0,0 +1,128 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Christopher Baines <mail <at> cbaines.net>
+;;;
+;;; 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 services ci)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages ci)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu services admin)
+  #:use-module (gnu system shadow)
+  #:use-module (ice-9 match)
+  #:export (<laminar-configuration>
+            laminar-configuration
+            laminar-configuration?
+            laminar-configuration-home-directory
+            laminar-configuration-bind-http
+            laminar-configuration-bind-rpc
+            laminar-configuration-title
+            laminar-configuration-keep-rundirs
+            laminar-configuration-archive-url
+            laminar-configuration-base-url
+
+            laminar-service-type))
+
+;;;; Commentary:
+;;;
+;;; This module implements a service that to run instances of Laminar, a
+;;; continuous integration tool.
+;;;
+;;;; Code:
+
+(define-record-type* <laminar-configuration>
+  laminar-configuration make-laminar-configuration
+  laminar-configuration?
+  (laminar          laminars-configuration-laminar
+                    (default laminar))
+  (home-directory   laminar-configuration-home-directory
+                    (default "/var/lib/laminar"))
+  (bind-http        laminar-configuration-bind-http
+                    (default "*:8080"))
+  (bind-rpc         laminar-configuration-bind-rpc
+                    (default "unix-abstract:laminar"))
+  (title            laminar-configuration-title
+                    (default "Laminar"))
+  (keep-rundirs     laminar-keep-rundirs
+                    (default 0))
+  (archive-url      laminar-archive-url
+                    (default #f))
+  (base-url         laminar-base-url
+                    (default #f)))
+
+(define laminar-shepherd-service
+  (match-lambda
+    (($ <laminar-configuration> laminar home-directory
+                                bind-http bind-rpc
+                                title keep-rundirs archive-url
+                                base-url)
+     (list (shepherd-service
+            (documentation "Run Laminar.")
+            (provision '(laminar))
+            (requirement '(networking))
+            (start #~(make-forkexec-constructor
+                      (list #$(file-append laminar "/sbin/laminard"))
+                      #:environment-variables
+                      `(,(string-append "LAMINAR_HOME="
+                                        #$home-directory)
+                        ,(string-append "LAMINAR_BIND_HTTP="
+                                        #$bind-http)
+                        ,(string-append "LAMINAR_TITLE="
+                                        #$title)
+                        ,(string-append "LAMINAR_KEEP_RUNDIRS="
+                                        #$(number->string
+                                           keep-rundirs))
+                        ,@(if #$archive-url
+                              (list
+                               (string-append "LAMINAR_ARCHIVE_URL="
+                                              #$archive-url))
+                              '())
+                        ,@(if #$base-url
+                              (list
+                               (string-append "LAMINAR_BASE_URL="
+                                              #$base-url))
+                              '()))
+                      #:user "laminar"
+                      #:group "laminar"))
+            (stop #~(make-kill-destructor)))))))
+
+(define (laminar-account config)
+  "Return the user accounts and user groups for CONFIG."
+  (list (user-group
+         (name "laminar")
+         (system? #t))
+        (user-account
+         (name "laminar")
+         (group "laminar")
+         (system? #t)
+         (comment "Laminar privilege separation user")
+         (home-directory (laminar-configuration-home-directory config))
+         (shell #~(string-append #$shadow "/sbin/nologin")))))
+
+(define laminar-service-type
+  (service-type
+   (name 'laminar)
+   (extensions
+    (list
+     (service-extension shepherd-root-service-type laminar-shepherd-service)
+     (service-extension account-service-type laminar-account)))
+   (default-value (laminar-configuration))
+   (description
+    "Run the Laminar continuous integration service.")))
diff --git a/gnu/tests/ci.scm b/gnu/tests/ci.scm
new file mode 100644
index 0000000000..fe74e73e74
--- /dev/null
+++ b/gnu/tests/ci.scm
@@ -0,0 +1,129 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017 Christopher Baines <mail <at> cbaines.net>
+;;; Copyright © 2017, 2018 Clément Lassieur <clement <at> lassieur.org>
+;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby <at> inria.fr>
+;;; Copyright © 2018 Marius Bakke <mbakke <at> fastmail.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 tests ci)
+  #:use-module (gnu tests)
+  #:use-module (gnu system)
+  #:use-module (gnu system file-systems)
+  #:use-module (gnu system shadow)
+  #:use-module (gnu system vm)
+  #:use-module (gnu services)
+  #:use-module (gnu services ci)
+  #:use-module (gnu services web)
+  #:use-module (gnu services networking)
+  #:use-module (guix gexp)
+  #:use-module (guix store)
+  #:export (%test-laminar))
+
+
+
+(define %laminar-os
+  ;; Operating system under test.
+  (simple-operating-system
+   (service dhcp-client-service-type)
+   (service laminar-service-type)))
+
+(define* (run-laminar-test #:optional (http-port 8080))
+  "Run tests in %LAMINAR-OS, which has laminar running and listening on
+HTTP-PORT."
+  (define os
+    (marionette-operating-system
+     %laminar-os
+     #:imported-modules '((gnu services herd)
+                          (guix combinators))))
+
+  (define vm
+    (virtual-machine
+     (operating-system os)
+     (port-forwardings `((,http-port . 8080)))))
+
+  (define test
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (srfi srfi-11) (srfi srfi-64)
+                       (ice-9 match)
+                       (gnu build marionette)
+                       (web uri)
+                       (web client)
+                       (web response))
+
+          (define marionette
+            ;; Forward the guest's HTTP-PORT, where laminar is listening, to
+            ;; port 8080 in the host.
+            (make-marionette (list #$vm)))
+
+          (mkdir #$output)
+          (chdir #$output)
+
+          (test-begin "laminar")
+
+          (test-assert "service running"
+            (marionette-eval
+             '(begin
+                (use-modules (gnu services herd))
+                (start-service 'laminar))
+             marionette))
+
+          (define* (retry-on-error f #:key times delay)
+            (let loop ((attempt 1))
+              (match (catch
+                      #t
+                      (lambda ()
+                        (cons #t
+                              (f)))
+                      (lambda args
+                        (cons #f
+                              args)))
+                ((#t . return-value)
+                 return-value)
+                ((#f . error-args)
+                 (if (>= attempt times)
+                     error-args
+                     (begin
+                       (sleep delay)
+                       (loop (+ 1 attempt))))))))
+
+          (test-equal "http-get"
+            200
+            (retry-on-error
+             (lambda ()
+               (let-values (((response text)
+                             (http-get #$(format
+                                          #f
+                                          "http://localhost:~A/"
+                                          http-port)
+                                       ;; TODO: Why does decoding fail?
+                                       #:decode-body? #f)))
+                 (response-code response)))
+             #:times 10
+             #:delay 5))
+
+          (test-end)
+          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+  (gexp->derivation "laminar-test" test))
+
+(define %test-laminar
+  (system-test
+   (name "laminar")
+   (description "Connect to a running Laminar server.")
+   (value (run-laminar-test))))
-- 
2.30.1





Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Mon, 05 Apr 2021 09:57:01 GMT) Full text and rfc822 format available.

Message #14 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 47392 <at> debbugs.gnu.org
Subject: Re: bug#47392: [PATCH 0/2] Add Laminar.
Date: Mon, 05 Apr 2021 11:56:12 +0200
Hi Chris,

Christopher Baines <mail <at> cbaines.net> skribis:

> I've wrote these patches a long while ago, and I've been using Laminar
> too, since Laminar fills a role in the patches testing setup I've been
> working on.

Neat.

> I was holding off on submitting them until more could be done about the
> JavaScript Laminar uses, but merging these patches would be useful, and
> I think the line of including non-source JavaScript in packages has
> already been crossed.

Heheh.

> +       ("vue.min.js"
> +        ,(origin (method url-fetch)
> +                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
> +                                     "vue/2.6.12/vue.min.js"))
> +                 (sha256
> +                  (base32
> +                   "01zklp5cyik65dfn64m8h2y2dxzgbyzgmbf99y7fwgnf0155r7pq"))))
> +       ("vue-router.min.js"
> +        ,(origin (method url-fetch)
> +                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
> +                                     "vue-router/3.4.8/vue-router.min.js"))
> +                 (sha256
> +                  (base32
> +                   "07gx7znb30rk1z7w6ca7dlfjp44q12bbq6jghwfm27mf6psa80as"))))
> +       ("ansi_up.js"
> +        ,(origin (method url-fetch)
> +                 (uri (string-append "https://raw.githubusercontent.com/"
> +                                     "drudru/ansi_up/v1.3.0/ansi_up.js"))
> +                 (sha256
> +                  (base32
> +                   "1993dywxqi2ylnxybwk7m0s0bg2bq7kfllpyr0s8ck6chd0p8i6r"))))
> +       ("Chart.min.js"
> +        ,(origin (method url-fetch)
> +                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
> +                                     "Chart.js/2.7.2/Chart.min.js"))
> +                 (sha256
> +                  (base32
> +                   "1jh4h12qchsba03dx03mrvs4r8g9qfjn56xm56jqzgqf7r209xq9"))))))

I wonder if it would be possible to, instead, get the non-minified files
upstream, and minify them with ‘uglify-js’, as is done in ‘hpcguix-web’.
WDYT?

That might also give more stable URLs that those above.

> +    (synopsis "Lightweight Continuous Integration service")
> +    (description
> +     "Laminar is a lightweight and modular Continuous Integration service.  It

Maybe s/Continuous Integration/continuous integration/.

The rest LGTM!

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Mon, 05 Apr 2021 09:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 47392 <at> debbugs.gnu.org
Subject: Re: bug#47392: [PATCH 0/2] Add Laminar.
Date: Mon, 05 Apr 2021 11:58:18 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> * gnu/services/ci.scm: New file.
> * gnu/tests/ci.scm: New file.
> * doc/guix.texi (Laminar): Document the Laminar service.

[...]

> +@defvr {Scheme Procedure} laminar-service-type
> +The type of the Laminar service.  Its value must be a
> +@code{laminar-configuration} object, as described below.
> +@end defvr

It would be nice to add a config example with one or two sentences
explaining what it does.

> +  #:export (<laminar-configuration>

Please don’t export the record type descriptor.

Otherwise LGTM, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Wed, 07 Apr 2021 06:36:01 GMT) Full text and rfc822 format available.

Message #20 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 47392 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#47392] [PATCH 0/2] Add Laminar.
Date: Wed, 7 Apr 2021 08:35:19 +0200
[Message part 1 (text/plain, inline)]
Hi Chris,

> I wonder if it would be possible to, instead, get the non-minified files
> upstream, and minify them with ‘uglify-js’, as is done in ‘hpcguix-web’.
> WDYT?
you could also use the new node-build-system in combination with Jelle’s
WIP node importer in the branch wip-node-importer. Use something like:

	guix environment guix --ad-hoc guile-semver
	./pre-inst-env guix import npm-binary -r chart.js '^2.7'

I’ve run the imports for Laminar and attached a file with packages.
Usually there’s a dist/ directory in the output that contains minified
JavaScript.  Obviously that isn’t a full source build (yet).

Cheers,
Lars

[node.scm (application/vnd.lotus-screencam, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Fri, 09 Apr 2021 11:07:01 GMT) Full text and rfc822 format available.

Message #23 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 47392 <at> debbugs.gnu.org
Subject: Re: bug#47392: [PATCH 0/2] Add Laminar.
Date: Fri, 09 Apr 2021 12:06:02 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> * gnu/services/ci.scm: New file.
>> * gnu/tests/ci.scm: New file.
>> * doc/guix.texi (Laminar): Document the Laminar service.
>
> [...]
>
>> +@defvr {Scheme Procedure} laminar-service-type
>> +The type of the Laminar service.  Its value must be a
>> +@code{laminar-configuration} object, as described below.
>> +@end defvr
>
> It would be nice to add a config example with one or two sentences
> explaining what it does.

Sure, I've added an example now, albeit the simplest one.

>> +  #:export (<laminar-configuration>
>
> Please don’t export the record type descriptor.

I removed this.

> Otherwise LGTM, thanks!

Cool, I've pushed this as eda4bb4f16f74436b0caf1c584888c89b3c4c69b now.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Fri, 09 Apr 2021 11:07:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Fri, 09 Apr 2021 11:07:02 GMT) Full text and rfc822 format available.

Message #28 received at 47392-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 47392-done <at> debbugs.gnu.org
Subject: Re: bug#47392: [PATCH 0/2] Add Laminar.
Date: Fri, 09 Apr 2021 12:06:47 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Chris,
>
> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> +       ("vue.min.js"
>> +        ,(origin (method url-fetch)
>> +                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
>> +                                     "vue/2.6.12/vue.min.js"))
>> +                 (sha256
>> +                  (base32
>> +                   "01zklp5cyik65dfn64m8h2y2dxzgbyzgmbf99y7fwgnf0155r7pq"))))
>> +       ("vue-router.min.js"
>> +        ,(origin (method url-fetch)
>> +                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
>> +                                     "vue-router/3.4.8/vue-router.min.js"))
>> +                 (sha256
>> +                  (base32
>> +                   "07gx7znb30rk1z7w6ca7dlfjp44q12bbq6jghwfm27mf6psa80as"))))
>> +       ("ansi_up.js"
>> +        ,(origin (method url-fetch)
>> +                 (uri (string-append "https://raw.githubusercontent.com/"
>> +                                     "drudru/ansi_up/v1.3.0/ansi_up.js"))
>> +                 (sha256
>> +                  (base32
>> +                   "1993dywxqi2ylnxybwk7m0s0bg2bq7kfllpyr0s8ck6chd0p8i6r"))))
>> +       ("Chart.min.js"
>> +        ,(origin (method url-fetch)
>> +                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
>> +                                     "Chart.js/2.7.2/Chart.min.js"))
>> +                 (sha256
>> +                  (base32
>> +                   "1jh4h12qchsba03dx03mrvs4r8g9qfjn56xm56jqzgqf7r209xq9"))))))
>
> I wonder if it would be possible to, instead, get the non-minified files
> upstream, and minify them with ‘uglify-js’, as is done in ‘hpcguix-web’.
> WDYT?
>
> That might also give more stable URLs that those above.

Sure, I've adjusted the package definition to do this.

>> +    (synopsis "Lightweight Continuous Integration service")
>> +    (description
>> +     "Laminar is a lightweight and modular Continuous Integration service.  It
>
> Maybe s/Continuous Integration/continuous integration/.

Updated.

> The rest LGTM!

Great, I've pushed this as eda4bb4f16f74436b0caf1c584888c89b3c4c69b.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47392; Package guix-patches. (Fri, 09 Apr 2021 11:10:01 GMT) Full text and rfc822 format available.

Message #31 received at 47392 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 47392 <at> debbugs.gnu.org
Subject: Re: [bug#47392] [PATCH 0/2] Add Laminar.
Date: Fri, 09 Apr 2021 12:09:16 +0100
[Message part 1 (text/plain, inline)]
Lars-Dominik Braun <lars <at> 6xq.net> writes:

> Hi Chris,
>
>> I wonder if it would be possible to, instead, get the non-minified files
>> upstream, and minify them with ‘uglify-js’, as is done in ‘hpcguix-web’.
>> WDYT?
> you could also use the new node-build-system in combination with Jelle’s
> WIP node importer in the branch wip-node-importer. Use something like:
>
> 	guix environment guix --ad-hoc guile-semver
> 	./pre-inst-env guix import npm-binary -r chart.js '^2.7'
>
> I’ve run the imports for Laminar and attached a file with packages.
> Usually there’s a dist/ directory in the output that contains minified
> JavaScript.  Obviously that isn’t a full source build (yet).

Thanks Lars, I did try a while back, but I think there are some hard
parts (babel) to address. I'd also prefer to keep the number of packages
tainted by Javascript blobs to a minimum, so I view what's going on in
the laminar package as a lesser evil.

I do really want to see proper packages for these things at some point
though, and I hope to be able to spend more time working on it at some
point.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 07 May 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.