[PATCH] Upgrade Tailon from 1.1.1 to 1.3.0

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Marius Bakke
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 8 years ago
(address . guix-patches@gnu.org)
20170809082913.12847730@cbaines.net
Patches incomming...
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmKuclfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfYUg//Tl45W47oR4DqQBgXQsojkLlakpCwH5s34Cn7ul3mYvivBGm6rWigAPk/
+fI/nm2VBbm3Yj77Fz3mDRDLqXFE1U8JmyB2LX1GQnDN/p/ovO2FMADNnsiezX0v
WPj0TgcXZPiwWDUuquYeKkxDcaY6puTvyNYEK0jLZfxO0DTuyP40KudvL0g/djI1
tFlXMJCq366iuVZGNaDPkwWxXgKqfz6feJoxc41UgFb1uok55ypcuCbgp9mILRe6
GNbIll1y2ZS4t3JqnZf5SC6C58U7ul6Lrj6sW7gvZYmH5B/jPy33U1hHna09gqaE
UKPhRrS9fszq4VWaA5BO8rbVdDyCqrBV8wffA3SoiAt0DyMlutGtrYEPUDFeW/I1
Tjk2R3KNEBdLeRVWYXfn2FB1pK6IYticrCcUwdBFddfOYEjLXydueuDjSPxi+Bh5
Hnxn5ih1RybCR2LUfnlN6eA7vYlj4755LZL5HbSKvTkUezISARaYjFRO1EaMlir0
tg745fr0Ww8Mj2r1hDC59m/xxrZEGJDwk+GV0nL5pp3h6V8VbN3ujxeSrYT94qoG
e/dOWLH1QJzBh59wEYlZ8/HB8zS2Nv2fQP2cvvlrm7yJhy8y1nS/UY1hJzW8wiHk
ta6HGCDesvwlYvUM1/Vhi4Bjh3O01VSAN6B2qBABgLfq2MLlyHw=
=6LOm
-----END PGP SIGNATURE-----


Christopher Baines wrote 8 years ago
[PATCH 2/5] gnu: Update tailon to version 1.3.0.
(address . 28024@debbugs.gnu.org)
20170809080604.6236-2-mail@cbaines.net
From version 1.1.1.

* gnu/packages/logging.scm (tailon)[version]: Change to 1.3.0.
[inputs]: Add python-tornado-http-auth.
---
gnu/packages/logging.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index eecfe4558..b4f7caf56 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -96,18 +96,19 @@ command line.")
(define-public tailon
(package
(name "tailon")
- (version "1.1.1")
+ (version "1.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri name version))
(sha256
(base32
- "08clrwpfdxcv2z2b5ardpmim4alahbw4l7631dhw62xhbcf6wjzz"))))
+ "0wl2wm6p3pc0vkk33s7rzgcfvs9cwxfmlz997pdfhlw72r00l7s5"))))
(build-system python-build-system)
(inputs
`(("python-pyyaml" ,python-pyyaml)
("python-sockjs-tornado" ,python-sockjs-tornado)
+ ("python-tornado-http-auth" ,python-tornado-http-auth)
("python-tornado" ,python-tornado)))
(arguments
`(#:phases
--
2.14.0
Christopher Baines wrote 8 years ago
[PATCH 5/5] services: admin: Simplify the handling of the Tailon debug? option.
(address . 28024@debbugs.gnu.org)
20170809080604.6236-5-mail@cbaines.net
* gnu/services/admin.scm (tailon-configuration-file-compiler): Simplify the
handling of debug?.
---
gnu/services/admin.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index e24aebae2..14452a86c 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -276,7 +276,7 @@ for ROTATION."
("commands" . ,(string-append "["
(string-join allowed-commands ", ")
"]"))
- ,@(if debug? '(("debug" . "true")) '())
+ ("debug" . ,(if debug? "true" #f))
("wrap-lines" . ,(if wrap-lines "true" "false"))
("http-auth" . ,http-auth)
("users" . ,(if users
--
2.14.0
Christopher Baines wrote 8 years ago
[PATCH 3/5] services: Add missing wrap-lines option to tailon.
(address . 28024@debbugs.gnu.org)
20170809080604.6236-3-mail@cbaines.net
* gnu/services/admin.scm (<tailon-configuration-file>): Add wrap-lines.
(tailon-configuration-wrap-lines): New procedure.
(tailon-configuration-file-compiler): Add support for wrap-lines.
* doc/guix.texi (Monitoring Services): Document the wrap-lines Tailon
configuration option.
---
doc/guix.texi | 5 +++++
gnu/services/admin.scm | 12 +++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)

Toggle diff (62 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 88bf0bb62..e4903be83 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13769,6 +13769,11 @@ Commands to allow running. By default, @code{sed} is disabled.
@item @code{debug?} (default: @code{#f})
Set @code{debug?} to @code{#t} to show debug messages.
+@item @code{wrap-lines} (default: @code{#t})
+Initial line wrapping state in the web interface. Set to @code{#t} to
+initially wrap lines (the default), or to @code{#f} to initially not
+wrap lines.
+
@end table
@end deftp
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 1044833fe..19169427c 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -59,6 +59,8 @@
tailon-configuration-file-tail-lines
tailon-configuration-file-allowed-commands
tailon-configuration-file-debug?
+ tailon-configuration-file-wrap-lines
+
<tailon-configuration>
tailon-configuration
@@ -220,7 +222,9 @@ for ROTATION."
(allowed-commands tailon-configuration-file-allowed-commands
(default '("tail" "grep" "awk")))
(debug? tailon-configuration-file-debug?
- (default #f)))
+ (default #f))
+ (wrap-lines tailon-configuration-file-wrap-lines
+ (default #t)))
(define (tailon-configuration-files-string files)
(string-append
@@ -249,7 +253,8 @@ for ROTATION."
(match file
(($ <tailon-configuration-file> files bind relative-root
allow-transfers? follow-names?
- tail-lines allowed-commands debug?)
+ tail-lines allowed-commands debug?
+ wrap-lines)
(text-file
"tailon-config.yaml"
(string-concatenate
@@ -267,7 +272,8 @@ for ROTATION."
("commands" . ,(string-append "["
(string-join allowed-commands ", ")
"]"))
- ,@(if debug? '(("debug" . "true")) '()))))))))
+ ,@(if debug? '(("debug" . "true")) '())
+ ("wrap-lines" . ,(if wrap-lines "true" "false")))))))))
(define-record-type* <tailon-configuration>
tailon-configuration make-tailon-configuration
--
2.14.0
Christopher Baines wrote 8 years ago
[PATCH 4/5] services: Update the Tailon service for Tailon 1.3.0.
(address . 28024@debbugs.gnu.org)
20170809080604.6236-4-mail@cbaines.net
Tailon 1.3.0 (upgraded from 1.1.1) adds support for HTTP authentication.

* gnu/services/admin.scm (<tailon-configuration-file>): Add http-auth and
users configuration values.
(tailon-configuration-file-http-auth, tailon-configuration-file-users): New
procedures.
(tailon-configuration-file-compiler): Add support for the http-auth and
users configuration options.
* doc/guix.texi (Monitoring Services): Document authentication for Tailon.
---
doc/guix.texi | 18 ++++++++++++++++++
gnu/services/admin.scm | 24 +++++++++++++++++++-----
2 files changed, 37 insertions(+), 5 deletions(-)

Toggle diff (87 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index e4903be83..c7787e4a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13774,6 +13774,24 @@ Initial line wrapping state in the web interface. Set to @code{#t} to
initially wrap lines (the default), or to @code{#f} to initially not
wrap lines.
+@item @code{http-auth} (default: @code{#f})
+HTTP authentication type to use. Set to @code{#f} to disable
+authentication (the default). Supported values are @code{"digest"} or
+@code{"basic"}.
+
+@item @code{users} (default: @code{#f})
+If HTTP authentication is enabled (see @code{http-auth}), access will be
+restricted to the credentials provided here. To configure users, use a
+list of pairs, where the first element of the pair is the username, and
+the 2nd element of the pair is the password.
+
+@example
+(tailon-configuration-file
+ (http-auth "basic")
+ (users '(("user1" . "password1")
+ ("user2" . "password2"))))
+@end example
+
@end table
@end deftp
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 19169427c..e24aebae2 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -59,8 +59,8 @@
tailon-configuration-file-tail-lines
tailon-configuration-file-allowed-commands
tailon-configuration-file-debug?
- tailon-configuration-file-wrap-lines
-
+ tailon-configuration-file-http-auth
+ tailon-configuration-file-users
<tailon-configuration>
tailon-configuration
@@ -224,7 +224,11 @@ for ROTATION."
(debug? tailon-configuration-file-debug?
(default #f))
(wrap-lines tailon-configuration-file-wrap-lines
- (default #t)))
+ (default #t))
+ (http-auth tailon-configuration-file-http-auth
+ (default #f))
+ (users tailon-configuration-file-users
+ (default #f)))
(define (tailon-configuration-files-string files)
(string-append
@@ -254,7 +258,7 @@ for ROTATION."
(($ <tailon-configuration-file> files bind relative-root
allow-transfers? follow-names?
tail-lines allowed-commands debug?
- wrap-lines)
+ wrap-lines http-auth users)
(text-file
"tailon-config.yaml"
(string-concatenate
@@ -273,7 +277,17 @@ for ROTATION."
(string-join allowed-commands ", ")
"]"))
,@(if debug? '(("debug" . "true")) '())
- ("wrap-lines" . ,(if wrap-lines "true" "false")))))))))
+ ("wrap-lines" . ,(if wrap-lines "true" "false"))
+ ("http-auth" . ,http-auth)
+ ("users" . ,(if users
+ (string-concatenate
+ (cons "\n"
+ (map (match-lambda
+ ((user . pass)
+ (string-append
+ " " user ":" pass)))
+ users)))
+ #f)))))))))
(define-record-type* <tailon-configuration>
tailon-configuration make-tailon-configuration
--
2.14.0
Christopher Baines wrote 8 years ago
[PATCH 1/5] gnu: Add python-tornado-http-auth.
(address . 28024@debbugs.gnu.org)
20170809080604.6236-1-mail@cbaines.net
* gnu/packages/python.scm (python-tornado-http-auth): New variable.
---
gnu/packages/python.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 79c6eca00..227c01027 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6560,6 +6560,29 @@ connection to each user.")
("python2-singledispatch" ,python2-singledispatch)
,@(package-propagated-inputs tornado))))))
+(define-public python-tornado-http-auth
+ (package
+ (name "python-tornado-http-auth")
+ (version "1.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "tornado-http-auth" version))
+ (sha256
+ (base32
+ "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-tornado" ,python-tornado)))
+ (home-page
+ "https://github.com/gvalkov/tornado-http-auth")
+ (synopsis
+ "Digest and basic authentication module for Tornado")
+ (description
+ "Provides support for adding authentication to services using the Tornado
+web framework, either via the basic or digest authentication schemes.")
+ (license license:asl2.0)))
+
;; the python- version can be removed with python-3.5
(define-public python-backports-abc
(package
--
2.14.0
Marius Bakke wrote 8 years ago
Re: [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0
87bmno4g7z.fsf@fastmail.com
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (2 lines)
> Patches incomming...

Pro tip: You can use `git format-patch --cover-letter` to generate a
nice diffstat for the upcoming patches. Handy for signing off whole
series at once ;-) these LGTM at least.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlmLdeEACgkQoqBt8qM6
VPrruggAyIP7ACIvSH2Mv8Xdshc+d6k9cQKD/xTxlGXPY8JaYl7GFIHajDVk2vP+
T82mgBXUf8OJfxRypMMXlzG7XwpMA94qYTtwKFJmAM2L3/diLHN2X1K5AjUkn4Wf
zDclaNX/mnprI3zGz/jtRoNU6TJVqeFhR4Evq6MgiZpL8lIzWAAENmMETqsBKOSA
geTzIcHIXbGf9JvcD1PP4r/zt9fIvE9740e7dTu7IChEY/96wnXUGrOnzRTox6NH
C1hz93PsspBzQxdA5U8hU7UVpdKEENXi7WivQdSyghzlt+xosS+IXlacrCDf2S/m
FE2BMWMdegXoexpP8CiaGs/PO35Xcw==
=IsGQ
-----END PGP SIGNATURE-----

Christopher Baines wrote 8 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 28024-done@debbugs.gnu.org)
20170810004306.21351791@cbaines.net
On Wed, 09 Aug 2017 22:51:44 +0200
Marius Bakke <mbakke@fastmail.com> wrote:

Toggle quote (8 lines)
> Christopher Baines <mail@cbaines.net> writes:
>
> > Patches incomming...
>
> Pro tip: You can use `git format-patch --cover-letter` to generate a
> nice diffstat for the upcoming patches. Handy for signing off whole
> series at once ;-) these LGTM at least.

That's really neat, thanks for the tip and for reviewing :)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmLngpfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xc1XQ//dvxFY0ayhiEYORu8uKyAd2UtHHvVERGRl/jSH1D1E/1ZC430vvGF3qe5
FwUOsCXP0tg/almW5NMYfxJFmtmDDSzHpEhxEkkxfu33tQv831iNvSKauO/rmUKR
0MKAkkxEklQt2zDKPzGmyBz+8OKXFa9ejmMpxwZQcZ6j4uVy+Q9FIHXAczIts67w
1gnAkpyqGezqxjvgnQGc/e4YYFhXj6hduYgsMRqXZ4aKiS0DDi/SN98Y313k2irq
lUM6036SxUGuQF2pEBOY1X/0UgOPs5Hah3MIjPxuJ8qplnjuqemuueeRpzY+45p4
nTllYpysDTg3BSTQuqSSu1jS3+DiQXdtetbTLcUF9LCRyOuLZMeLhqZP+YJfXW1F
Pdwb1iXMYrH9j5UQqwnOOa6yv1ShJpl4tMxCQSXy8MMU0hRINDiF2UXOpFbVm+h0
G8aLoTrP4QbxcP2LZ+//zG80rISivezJF+JPe9Nj2g/fmywShePwDpgHGtBzjoPY
uWbUpGA6ZAXjFwD+TNBWU29ZIjUWdo5Vo9ASHZzEydmyQfAJYL1rGRmCG6YtEe3A
0EHrRpWv0tYDBC2TfAZCvGB/t1CxwtfUpa4PnkO+dIympn/vJ1xKZZlCpPe+yd3H
VPaZdkDypJo0LFqgBLun2pCtkzug0yXHYJ/sckWOKbkCulZnioQ=
=8BFb
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 28024@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 28024
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help