guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49886] [PATCH] Add gitile and gitile service


From: Ludovic Courtès
Subject: [bug#49886] [PATCH] Add gitile and gitile service
Date: Tue, 10 Aug 2021 12:38:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello!

Julien Lepiller <julien@lepiller.eu> skribis:

> Attached is a small patch series that adds gitile and the associated
> service type. Gitile is a small git forge project I have, and some of
> you expressed their interest, so here it is :)

Woohoo, nice!  To complement Maxime’s comments:

> From 38773e575b313caedfc788d4e28fd219265b4254 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Thu, 5 Aug 2021 02:57:32 +0200
> Subject: [PATCH 1/2] gnu: Add gitile.
>
> * gnu/packages/version-control.scm (gitile): New variable.

[...]

> +    (synopsis "Simple git forge written in Guile")
> +    (description "Gitile is a git forge written in Guile that lets you

s/git/Git/

> From 3cd7ef0ae922d77ff5d29c831dbdf8d350210fb7 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Thu, 5 Aug 2021 03:46:40 +0200
> Subject: [PATCH 2/2] gnu: version-control: Add gitile service.
>
> * gnu/services/version-control.scm (gitile-service-type): New variable.
> * doc/guix.texi (Version Control Services): Document it.

[...]

> +@subsubheading Gitile Service
> +
> +@cindex Gitile service
> +@cindex Git, forge
> +@uref{https://git.lepiller.eu/gitile, Gitile} is a Git forge for viewing
> +public git repository contents from a web browser.

s/git/Git/

> +Gitile works best in collaboration with Gitolite, and will serve the public
> +repositories from Gitolite by default.
> +
> +The following example will configure Gitile to serve repositories from a
> +custom location, with some default messages for the home page and the
> +footers.
> +
> +@lisp
> +(service gitile-service-type
> +         (gitile-configuration
> +           (repositories "/srv/git")
> +           (base-git-url "https://myweb.site/git";)
> +           (index-title "My git repositories")
> +           (intro '((p "This is all my public work!")))
> +           (footer '((p "This is the end")))
> +           (nginx-server-block
> +             (nginx-server-configuration
> +               (ssl-certificate
> +                 "/etc/letsencrypt/live/myweb.site/fullchain.pem")
> +               (ssl-certificate-key
> +                 "/etc/letsencrypt/live/myweb.site/privkey.pem")
> +               (listen '("443 ssl http2" "[::]:443 ssl http2"))
> +               (locations
> +                 (list
> +                   (git-http-nginx-location-configuration
> +                     (git-http-configuration
> +                       (uri-path "/git/")
> +                       (git-root "/var/lib/gitolite/repositories")))))))))
> +@end lisp

Could you write a couple of lines about the nginx server block?  It’s
quite intimidating and it’s not introduced in the paragraph above.


[...]

> +            <gitile-configuration>

No need to export the record type descriptor.

> +             (start (let ((gitile (file-append package "/bin/gitile")))
> +                          #~(make-forkexec-constructor
> +                              `(,#$gitile "-c" #$(gitile-config-file
> +                                                   host port database
> +                                                   repositories
> +                                                   base-git-url index-title
> +                                                   intro footer))

As a followup it’d be interesting to see if it can run in
‘make-forkexec-constructor/container’.

> +(define gitile-service-type
> +  (service-type
> +    (name 'gitile)
> +    (extensions
> +      (list (service-extension account-service-type
> +                               (const %gitile-accounts))
> +            (service-extension shepherd-root-service-type
> +                               gitile-shepherd-service)
> +            (service-extension nginx-service-type
> +                               gitile-nginx-server-block)))))

Please add a ‘description’ field.

Would be great if you could add a system test too.

Otherwise LGTM, it’s exciting to get more Guilish tooling!  :-)

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]