diff options
| author | Ian Eure <ian@retrospec.tv> | 2025-09-14 11:07:25 -0700 |
|---|---|---|
| committer | Ian Eure <ian@retrospec.tv> | 2025-09-14 11:13:17 -0700 |
| commit | 96c30d2bf650ca62beec280d541a0b52f2b6fc7d (patch) | |
| tree | 278103d1d1ab769007063afb5ad9266746435694 | |
| parent | 70b380bdf49831e294b253089d375b5440e5095f (diff) | |
gnu: Remove Tailon services and documentation.
The tailon package was removed in 63023deaf96bd0d90aba262b194bf1445ec5a0b6,
but the associated service and documentation weren’t, leading to `guix pull`
breaking.
Fixes guix/guix#2689.
* doc/guix.texi: Remove Tailon documentation.
* gnu/services/web.scm (tailon-service-type): Delete variable.
(tailon-configuration-file): Delete variable.
(tailon-configuration-file?): Delete variable.
(tailon-configuration-file-files): Delete variable.
(tailon-configuration-file-bind): Delete variable.
(tailon-configuration-file-relative-root): Delete variable.
(tailon-configuration-file-allow-transfers?): Delete variable.
(tailon-configuration-file-follow-names?): Delete variable.
(tailon-configuration-file-tail-lines): Delete variable.
(tailon-configuration-file-allowed-commands): Delete variable.
(tailon-configuration-file-debug?): Delete variable.
(tailon-configuration-file-http-auth): Delete variable.
(tailon-configuration-file-users): Delete variable
(tailon-configuration): Delete variable.
(tailon-configuration?): Delete variable.
(tailon-configuration-config-file): Delete variable.
(tailon-configuration-package): Delete variable.
* gnu/tests/web.scm (%test-tailon): Delete variable.
Change-Id: I3b507df8233b0440baa6a2bce4604b5813cb3bb0
| -rw-r--r-- | doc/guix.texi | 108 | ||||
| -rw-r--r-- | gnu/services/web.scm | 167 | ||||
| -rw-r--r-- | gnu/tests/web.scm | 71 |
3 files changed, 0 insertions, 346 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 13665b568d7..0924aebf4ad 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -32940,114 +32940,6 @@ Defaults to @samp{#t}. | |||
| 32940 | @node Monitoring Services | 32940 | @node Monitoring Services |
| 32941 | @subsection Monitoring Services | 32941 | @subsection Monitoring Services |
| 32942 | 32942 | ||
| 32943 | @subsubheading Tailon Service | ||
| 32944 | |||
| 32945 | @uref{https://tailon.readthedocs.io/, Tailon} is a web application for | ||
| 32946 | viewing and searching log files. | ||
| 32947 | |||
| 32948 | The following example will configure the service with default values. | ||
| 32949 | By default, Tailon can be accessed on port 8080 (@code{http://localhost:8080}). | ||
| 32950 | |||
| 32951 | @lisp | ||
| 32952 | (service tailon-service-type) | ||
| 32953 | @end lisp | ||
| 32954 | |||
| 32955 | The following example customises more of the Tailon configuration, | ||
| 32956 | adding @command{sed} to the list of allowed commands. | ||
| 32957 | |||
| 32958 | @lisp | ||
| 32959 | (service tailon-service-type | ||
| 32960 | (tailon-configuration | ||
| 32961 | (config-file | ||
| 32962 | (tailon-configuration-file | ||
| 32963 | (allowed-commands '("tail" "grep" "awk" "sed")))))) | ||
| 32964 | @end lisp | ||
| 32965 | |||
| 32966 | |||
| 32967 | @deftp {Data Type} tailon-configuration | ||
| 32968 | Data type representing the configuration of Tailon. | ||
| 32969 | This type has the following parameters: | ||
| 32970 | |||
| 32971 | @table @asis | ||
| 32972 | @item @code{config-file} (default: @code{(tailon-configuration-file)}) | ||
| 32973 | The configuration file to use for Tailon. This can be set to a | ||
| 32974 | @dfn{tailon-configuration-file} record value, or any gexp | ||
| 32975 | (@pxref{G-Expressions}). | ||
| 32976 | |||
| 32977 | For example, to instead use a local file, the @code{local-file} function | ||
| 32978 | can be used: | ||
| 32979 | |||
| 32980 | @lisp | ||
| 32981 | (service tailon-service-type | ||
| 32982 | (tailon-configuration | ||
| 32983 | (config-file (local-file "./my-tailon.conf")))) | ||
| 32984 | @end lisp | ||
| 32985 | |||
| 32986 | @item @code{package} (default: @code{tailon}) | ||
| 32987 | The tailon package to use. | ||
| 32988 | |||
| 32989 | @end table | ||
| 32990 | @end deftp | ||
| 32991 | |||
| 32992 | @deftp {Data Type} tailon-configuration-file | ||
| 32993 | Data type representing the configuration options for Tailon. | ||
| 32994 | This type has the following parameters: | ||
| 32995 | |||
| 32996 | @table @asis | ||
| 32997 | @item @code{files} (default: @code{(list "/var/log")}) | ||
| 32998 | List of files to display. The list can include strings for a single file | ||
| 32999 | or directory, or a list, where the first item is the name of a | ||
| 33000 | subsection, and the remaining items are the files or directories in that | ||
| 33001 | subsection. | ||
| 33002 | |||
| 33003 | @item @code{bind} (default: @code{"localhost:8080"}) | ||
| 33004 | Address and port to which Tailon should bind on. | ||
| 33005 | |||
| 33006 | @item @code{relative-root} (default: @code{#f}) | ||
| 33007 | URL path to use for Tailon, set to @code{#f} to not use a path. | ||
| 33008 | |||
| 33009 | @item @code{allow-transfers?} (default: @code{#t}) | ||
| 33010 | Allow downloading the log files in the web interface. | ||
| 33011 | |||
| 33012 | @item @code{follow-names?} (default: @code{#t}) | ||
| 33013 | Allow tailing of not-yet existent files. | ||
| 33014 | |||
| 33015 | @item @code{tail-lines} (default: @code{200}) | ||
| 33016 | Number of lines to read initially from each file. | ||
| 33017 | |||
| 33018 | @item @code{allowed-commands} (default: @code{(list "tail" "grep" "awk")}) | ||
| 33019 | Commands to allow running. By default, @code{sed} is disabled. | ||
| 33020 | |||
| 33021 | @item @code{debug?} (default: @code{#f}) | ||
| 33022 | Set @code{debug?} to @code{#t} to show debug messages. | ||
| 33023 | |||
| 33024 | @item @code{wrap-lines} (default: @code{#t}) | ||
| 33025 | Initial line wrapping state in the web interface. Set to @code{#t} to | ||
| 33026 | initially wrap lines (the default), or to @code{#f} to initially not | ||
| 33027 | wrap lines. | ||
| 33028 | |||
| 33029 | @item @code{http-auth} (default: @code{#f}) | ||
| 33030 | HTTP authentication type to use. Set to @code{#f} to disable | ||
| 33031 | authentication (the default). Supported values are @code{"digest"} or | ||
| 33032 | @code{"basic"}. | ||
| 33033 | |||
| 33034 | @item @code{users} (default: @code{#f}) | ||
| 33035 | If HTTP authentication is enabled (see @code{http-auth}), access will be | ||
| 33036 | restricted to the credentials provided here. To configure users, use a | ||
| 33037 | list of pairs, where the first element of the pair is the username, and | ||
| 33038 | the 2nd element of the pair is the password. | ||
| 33039 | |||
| 33040 | @lisp | ||
| 33041 | (tailon-configuration-file | ||
| 33042 | (http-auth "basic") | ||
| 33043 | (users '(("user1" . "password1") | ||
| 33044 | ("user2" . "password2")))) | ||
| 33045 | @end lisp | ||
| 33046 | |||
| 33047 | @end table | ||
| 33048 | @end deftp | ||
| 33049 | |||
| 33050 | |||
| 33051 | @subsubheading Darkstat Service | 32943 | @subsubheading Darkstat Service |
| 33052 | @cindex darkstat | 32944 | @cindex darkstat |
| 33053 | Darkstat is a packet sniffer that captures network traffic, calculates | 32945 | Darkstat is a packet sniffer that captures network traffic, calculates |
diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f811497ae1c..d12257690ce 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm | |||
| @@ -204,26 +204,6 @@ | |||
| 204 | hpcguix-web-configuration? | 204 | hpcguix-web-configuration? |
| 205 | hpcguix-web-service-type | 205 | hpcguix-web-service-type |
| 206 | 206 | ||
| 207 | tailon-configuration-file | ||
| 208 | tailon-configuration-file? | ||
| 209 | tailon-configuration-file-files | ||
| 210 | tailon-configuration-file-bind | ||
| 211 | tailon-configuration-file-relative-root | ||
| 212 | tailon-configuration-file-allow-transfers? | ||
| 213 | tailon-configuration-file-follow-names? | ||
| 214 | tailon-configuration-file-tail-lines | ||
| 215 | tailon-configuration-file-allowed-commands | ||
| 216 | tailon-configuration-file-debug? | ||
| 217 | tailon-configuration-file-http-auth | ||
| 218 | tailon-configuration-file-users | ||
| 219 | |||
| 220 | tailon-configuration | ||
| 221 | tailon-configuration? | ||
| 222 | tailon-configuration-config-file | ||
| 223 | tailon-configuration-package | ||
| 224 | |||
| 225 | tailon-service-type | ||
| 226 | |||
| 227 | anonip-configuration | 207 | anonip-configuration |
| 228 | anonip-configuration? | 208 | anonip-configuration? |
| 229 | anonip-configuration-anonip | 209 | anonip-configuration-anonip |
| @@ -1355,153 +1335,6 @@ a webserver.") | |||
| 1355 | 1335 | ||
| 1356 | 1336 | ||
| 1357 | ;;; | 1337 | ;;; |
| 1358 | ;;; Tailon | ||
| 1359 | ;;; | ||
| 1360 | |||
| 1361 | (define-record-type* <tailon-configuration-file> | ||
| 1362 | tailon-configuration-file make-tailon-configuration-file | ||
| 1363 | tailon-configuration-file? | ||
| 1364 | (files tailon-configuration-file-files | ||
| 1365 | (default '("/var/log"))) | ||
| 1366 | (bind tailon-configuration-file-bind | ||
| 1367 | (default "localhost:8080")) | ||
| 1368 | (relative-root tailon-configuration-file-relative-root | ||
| 1369 | (default #f)) | ||
| 1370 | (allow-transfers? tailon-configuration-file-allow-transfers? | ||
| 1371 | (default #t)) | ||
| 1372 | (follow-names? tailon-configuration-file-follow-names? | ||
| 1373 | (default #t)) | ||
| 1374 | (tail-lines tailon-configuration-file-tail-lines | ||
| 1375 | (default 200)) | ||
| 1376 | (allowed-commands tailon-configuration-file-allowed-commands | ||
| 1377 | (default '("tail" "grep" "awk"))) | ||
| 1378 | (debug? tailon-configuration-file-debug? | ||
| 1379 | (default #f)) | ||
| 1380 | (wrap-lines tailon-configuration-file-wrap-lines | ||
| 1381 | (default #t)) | ||
| 1382 | (http-auth tailon-configuration-file-http-auth | ||
| 1383 | (default #f)) | ||
| 1384 | (users tailon-configuration-file-users | ||
| 1385 | (default #f))) | ||
| 1386 | |||
| 1387 | (define (tailon-configuration-files-string files) | ||
| 1388 | (string-append | ||
| 1389 | "\n" | ||
| 1390 | (string-join | ||
| 1391 | (map | ||
| 1392 | (lambda (x) | ||
| 1393 | (string-append | ||
| 1394 | " - " | ||
| 1395 | (cond | ||
| 1396 | ((string? x) | ||
| 1397 | (simple-format #f "'~A'" x)) | ||
| 1398 | ((list? x) | ||
| 1399 | (string-join | ||
| 1400 | (cons (simple-format #f "'~A':" (car x)) | ||
| 1401 | (map | ||
| 1402 | (lambda (x) (simple-format #f " - '~A'" x)) | ||
| 1403 | (cdr x))) | ||
| 1404 | "\n")) | ||
| 1405 | (else (error x))))) | ||
| 1406 | files) | ||
| 1407 | "\n"))) | ||
| 1408 | |||
| 1409 | (define-gexp-compiler (tailon-configuration-file-compiler | ||
| 1410 | (file <tailon-configuration-file>) system target) | ||
| 1411 | (match file | ||
| 1412 | (($ <tailon-configuration-file> files bind relative-root | ||
| 1413 | allow-transfers? follow-names? | ||
| 1414 | tail-lines allowed-commands debug? | ||
| 1415 | wrap-lines http-auth users) | ||
| 1416 | (text-file | ||
| 1417 | "tailon-config.yaml" | ||
| 1418 | (string-concatenate | ||
| 1419 | (filter-map | ||
| 1420 | (match-lambda | ||
| 1421 | ((key . #f) #f) | ||
| 1422 | ((key . value) (string-append key ": " value "\n"))) | ||
| 1423 | |||
| 1424 | `(("files" . ,(tailon-configuration-files-string files)) | ||
| 1425 | ("bind" . ,bind) | ||
| 1426 | ("relative-root" . ,relative-root) | ||
| 1427 | ("allow-transfers" . ,(if allow-transfers? "true" "false")) | ||
| 1428 | ("follow-names" . ,(if follow-names? "true" "false")) | ||
| 1429 | ("tail-lines" . ,(number->string tail-lines)) | ||
| 1430 | ("commands" . ,(string-append "[" | ||
| 1431 | (string-join allowed-commands ", ") | ||
| 1432 | "]")) | ||
| 1433 | ("debug" . ,(if debug? "true" #f)) | ||
| 1434 | ("wrap-lines" . ,(if wrap-lines "true" "false")) | ||
| 1435 | ("http-auth" . ,http-auth) | ||
| 1436 | ("users" . ,(if users | ||
| 1437 | (string-concatenate | ||
| 1438 | (cons "\n" | ||
| 1439 | (map (match-lambda | ||
| 1440 | ((user . pass) | ||
| 1441 | (string-append | ||
| 1442 | " " user ":" pass))) | ||
| 1443 | users))) | ||
| 1444 | #f))))))))) | ||
| 1445 | |||
| 1446 | (define-record-type* <tailon-configuration> | ||
| 1447 | tailon-configuration make-tailon-configuration | ||
| 1448 | tailon-configuration? | ||
| 1449 | (config-file tailon-configuration-config-file | ||
| 1450 | (default (tailon-configuration-file))) | ||
| 1451 | (package tailon-configuration-package | ||
| 1452 | (default tailon))) | ||
| 1453 | |||
| 1454 | (define tailon-shepherd-service | ||
| 1455 | (match-lambda | ||
| 1456 | (($ <tailon-configuration> config-file package) | ||
| 1457 | (list (shepherd-service | ||
| 1458 | (provision '(tailon)) | ||
| 1459 | (requirement '(user-processes)) | ||
| 1460 | (documentation "Run the tailon daemon.") | ||
| 1461 | (start #~(make-forkexec-constructor | ||
| 1462 | `(,(string-append #$package "/bin/tailon") | ||
| 1463 | "-c" ,#$config-file) | ||
| 1464 | #:user "tailon" | ||
| 1465 | #:group "tailon")) | ||
| 1466 | (stop #~(make-kill-destructor))))))) | ||
| 1467 | |||
| 1468 | (define %tailon-accounts | ||
| 1469 | (list (user-group (name "tailon") (system? #t)) | ||
| 1470 | (user-account | ||
| 1471 | (name "tailon") | ||
| 1472 | (group "tailon") | ||
| 1473 | (system? #t) | ||
| 1474 | (comment "tailon") | ||
| 1475 | (home-directory "/var/empty") | ||
| 1476 | (shell (file-append shadow "/sbin/nologin"))))) | ||
| 1477 | |||
| 1478 | (define tailon-service-type | ||
| 1479 | (service-type | ||
| 1480 | (name 'tailon) | ||
| 1481 | (description | ||
| 1482 | "Run Tailon, a Web application for monitoring, viewing, and searching log | ||
| 1483 | files.") | ||
| 1484 | (extensions | ||
| 1485 | (list (service-extension shepherd-root-service-type | ||
| 1486 | tailon-shepherd-service) | ||
| 1487 | (service-extension account-service-type | ||
| 1488 | (const %tailon-accounts)))) | ||
| 1489 | (compose concatenate) | ||
| 1490 | (extend (lambda (parameter files) | ||
| 1491 | (tailon-configuration | ||
| 1492 | (inherit parameter) | ||
| 1493 | (config-file | ||
| 1494 | (let ((old-config-file | ||
| 1495 | (tailon-configuration-config-file parameter))) | ||
| 1496 | (tailon-configuration-file | ||
| 1497 | (inherit old-config-file) | ||
| 1498 | (files (append (tailon-configuration-file-files old-config-file) | ||
| 1499 | files)))))))) | ||
| 1500 | (default-value (tailon-configuration)))) | ||
| 1501 | |||
| 1502 | |||
| 1503 | |||
| 1504 | ;;; | ||
| 1505 | ;;; Log anonymization | 1338 | ;;; Log anonymization |
| 1506 | ;;; | 1339 | ;;; |
| 1507 | 1340 | ||
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index 08151951fac..4d7a8c59d66 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm | |||
| @@ -54,7 +54,6 @@ | |||
| 54 | %test-varnish | 54 | %test-varnish |
| 55 | %test-php-fpm | 55 | %test-php-fpm |
| 56 | %test-hpcguix-web | 56 | %test-hpcguix-web |
| 57 | %test-tailon | ||
| 58 | %test-anonip | 57 | %test-anonip |
| 59 | %test-patchwork | 58 | %test-patchwork |
| 60 | %test-agate)) | 59 | %test-agate)) |
| @@ -480,76 +479,6 @@ HTTP-PORT, along with php-fpm." | |||
| 480 | (value (run-hpcguix-web-server-test name %hpcguix-web-os)))) | 479 | (value (run-hpcguix-web-server-test name %hpcguix-web-os)))) |
| 481 | 480 | ||
| 482 | 481 | ||
| 483 | (define %tailon-os | ||
| 484 | ;; Operating system under test. | ||
| 485 | (simple-operating-system | ||
| 486 | (service dhcpcd-service-type) | ||
| 487 | (service tailon-service-type | ||
| 488 | (tailon-configuration | ||
| 489 | (config-file | ||
| 490 | (tailon-configuration-file | ||
| 491 | (bind "0.0.0.0:8080"))))))) | ||
| 492 | |||
| 493 | (define* (run-tailon-test #:optional (http-port 8081)) | ||
| 494 | "Run tests in %TAILON-OS, which has tailon running and listening on | ||
| 495 | HTTP-PORT." | ||
| 496 | (define os | ||
| 497 | (marionette-operating-system | ||
| 498 | %tailon-os | ||
| 499 | #:imported-modules '((gnu services herd) | ||
| 500 | (guix combinators)))) | ||
| 501 | |||
| 502 | (define vm | ||
| 503 | (virtual-machine | ||
| 504 | (operating-system os) | ||
| 505 | (port-forwardings `((,http-port . 8080))))) | ||
| 506 | |||
| 507 | (define test | ||
| 508 | (with-imported-modules '((gnu build marionette)) | ||
| 509 | #~(begin | ||
| 510 | (use-modules (srfi srfi-11) (srfi srfi-64) | ||
| 511 | (ice-9 match) | ||
| 512 | (gnu build marionette) | ||
| 513 | (web uri) | ||
| 514 | (web client) | ||
| 515 | (web response)) | ||
| 516 | |||
| 517 | (define marionette | ||
| 518 | ;; Forward the guest's HTTP-PORT, where tailon is listening, to | ||
| 519 | ;; port 8080 in the host. | ||
| 520 | (make-marionette (list #$vm))) | ||
| 521 | |||
| 522 | (test-runner-current (system-test-runner #$output)) | ||
| 523 | (test-begin "tailon") | ||
| 524 | |||
| 525 | (test-assert "service running" | ||
| 526 | (wait-for-tcp-port 8080 marionette)) | ||
| 527 | |||
| 528 | (test-equal "http-get" | ||
| 529 | 200 | ||
| 530 | (#$retry-on-error | ||
| 531 | (lambda () | ||
| 532 | (let-values (((response text) | ||
| 533 | (http-get #$(format | ||
| 534 | #f | ||
| 535 | "http://localhost:~A/" | ||
| 536 | http-port) | ||
| 537 | #:decode-body? #t))) | ||
| 538 | (response-code response))) | ||
| 539 | #:times 10 | ||
| 540 | #:delay 5)) | ||
| 541 | |||
| 542 | (test-end)))) | ||
| 543 | |||
| 544 | (gexp->derivation "tailon-test" test)) | ||
| 545 | |||
| 546 | (define %test-tailon | ||
| 547 | (system-test | ||
| 548 | (name "tailon") | ||
| 549 | (description "Connect to a running Tailon server.") | ||
| 550 | (value (run-tailon-test)))) | ||
| 551 | |||
| 552 | |||
| 553 | ;;; | 482 | ;;; |
| 554 | ;;; Anonip | 483 | ;;; Anonip |
| 555 | ;;; | 484 | ;;; |
