GNU bug report logs - #28024
[PATCH] Upgrade Tailon from 1.1.1 to 1.3.0

Previous Next

Package: guix-patches;

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

Date: Wed, 9 Aug 2017 07:30:03 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 28024 in the body.
You can then email your comments to 28024 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#28024; Package guix-patches. (Wed, 09 Aug 2017 07:30:03 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. (Wed, 09 Aug 2017 07:30:03 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] Upgrade Tailon from 1.1.1 to 1.3.0
Date: Wed, 9 Aug 2017 08:29:13 +0100
[Message part 1 (text/plain, inline)]
Patches incomming...
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28024; Package guix-patches. (Wed, 09 Aug 2017 08:07:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 28024 <at> debbugs.gnu.org
Subject: [PATCH 2/5] gnu: Update tailon to version 1.3.0.
Date: Wed,  9 Aug 2017 09:06:01 +0100
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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#28024; Package guix-patches. (Wed, 09 Aug 2017 08:07:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 28024 <at> debbugs.gnu.org
Subject: [PATCH 5/5] services: admin: Simplify the handling of the Tailon
 debug? option.
Date: Wed,  9 Aug 2017 09:06:04 +0100
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#28024; Package guix-patches. (Wed, 09 Aug 2017 08:07:03 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 28024 <at> debbugs.gnu.org
Subject: [PATCH 3/5] services: Add missing wrap-lines option to tailon.
Date: Wed,  9 Aug 2017 09:06:02 +0100
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#28024; Package guix-patches. (Wed, 09 Aug 2017 08:07:03 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 28024 <at> debbugs.gnu.org
Subject: [PATCH 4/5] services: Update the Tailon service for Tailon 1.3.0.
Date: Wed,  9 Aug 2017 09:06:03 +0100
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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#28024; Package guix-patches. (Wed, 09 Aug 2017 08:07:04 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 28024 <at> debbugs.gnu.org
Subject: [PATCH 1/5] gnu: Add python-tornado-http-auth.
Date: Wed,  9 Aug 2017 09:06:00 +0100
* gnu/packages/python.scm (python-tornado-http-auth): New variable.
---
 gnu/packages/python.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

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





Information forwarded to guix-patches <at> gnu.org:
bug#28024; Package guix-patches. (Wed, 09 Aug 2017 20:52:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Christopher Baines <mail <at> cbaines.net>, 28024 <at> debbugs.gnu.org
Subject: Re: [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0
Date: Wed, 09 Aug 2017 22:51:44 +0200
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> 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.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Wed, 09 Aug 2017 23:44:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Wed, 09 Aug 2017 23:44:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 28024-done <at> debbugs.gnu.org
Subject: Re: [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0
Date: Thu, 10 Aug 2017 00:43:06 +0100
[Message part 1 (text/plain, inline)]
On Wed, 09 Aug 2017 22:51:44 +0200
Marius Bakke <mbakke <at> fastmail.com> wrote:

> Christopher Baines <mail <at> 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 :)
[Message part 2 (application/pgp-signature, inline)]

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

This bug report was last modified 7 years and 284 days ago.

Previous Next


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