unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#41688] Add rsyslog
@ 2020-06-03 14:29 Katherine Cox-Buday
  2020-06-12 16:45 ` Ludovic Courtès
  2021-12-31  9:22 ` bug#41688: [PATCH] " Ricardo Wurmus
  0 siblings, 2 replies; 5+ messages in thread
From: Katherine Cox-Buday @ 2020-06-03 14:29 UTC (permalink / raw)
  To: 41688

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-gnu-Add-libestr.patch --]
[-- Type: text/x-patch, Size: 2137 bytes --]

From 8d8d97441b397a48ae26761c2d826f35ae5d56e9 Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Tue, 2 Jun 2020 14:55:23 -0500
Subject: [PATCH 1/5] gnu: Add libestr.

* gnu/packages/c.scm (libestr): New variable.
---
 gnu/packages/c.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 3e227decc9..d3820c88b2 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright @ 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -339,3 +340,36 @@ address space pointers point to, or what locks a function acquires or
 releases.")
     (home-page "https://sparse.wiki.kernel.org/index.php/Main_Page")
     (license license:expat)))
+
+(define-public libestr
+  (package
+    (name "libestr")
+    (version "0.1.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/rsyslog/libestr.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ca4rj90c0dn7kqpbcchkflxjw88a7rxcnwbr0gply4a28i01nd8"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; autogen.sh calls configure at the end of the script.
+         (replace 'bootstrap
+           (lambda _ (invoke "autoreconf" "-vfi"))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)))
+    (home-page "https://github.com/rsyslog/libestr")
+    (synopsis "Helper functions for handling strings")
+    (description
+     "A library which contains some essential string manipulation
+functions and more, like escaping special characters.")
+    (license license:lgpl2.1)))
-- 
2.26.2


[-- Attachment #3: 0005-gnu-Add-rsyslog.patch --]
[-- Type: text/x-patch, Size: 9622 bytes --]

From 0e0e9cc550ff002d7bebb4f93b573c5ba527ac4d Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Tue, 2 Jun 2020 15:47:41 -0500
Subject: [PATCH 5/5] gnu: Add rsyslog.

* gnu/packages/logging.scm (rsyslog): New variable.
---
 gnu/packages/logging.scm | 218 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 217 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index 9139dc440e..f6084add2f 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -33,12 +33,27 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages c)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages geo)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages kerberos)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages autotools))
+  #:use-module (gnu packages tcl)
+  #:use-module (gnu packages tls))
 
 (define-public log4cpp
   (package
@@ -215,3 +230,204 @@ library.")
     ;; spdlog is under Expat license, but the bundled fmt library in
     ;; "include/spdlog/fmt/bundled" is under BSD 2 clause license.
     (license (list license:expat license:bsd-2))))
+
+(define-public rsyslog
+  (let ((modules (list "fmhash" "fmhttp" "imbatchreport"
+                       "imczmq" "imdiag" "imdocker"
+                       "imfile" "imgssapi" "imkafka"
+                       "imklog" "imkmsg" "immark"
+                       "improg" "impstats" "imptcp" "imtcp"
+                       "imtuxedoulog" "imudp" "imuxsock"
+                       "mmanon" "mmaudit" "mmcount"
+                       "mmdblookup" "mmexternal"
+                       "mmfields" "mmjsonparse"
+                       "mmkubernetes" "mmnormalize"
+                       "mmpstrucdata" "mmrfc5424addhmac"
+                       "mmrm1stspace" "mmsequence"
+                       "mmsnmptrapd" "mmtaghostname"
+                       "mmutf8fix" "omclickhouse"
+                       "omczmq" "omelasticsearch"
+                       "omfile-hardened" "omgssapi"
+                       "omhttpfs" "omhttp" "omkafka"
+                       "omlibdbi" "ommail" "ommysql" "ompgsql"
+                       "omprog" "omruleset" "omsnmp"
+                       "omstdout" "omtcl" "omtesting"
+                       "omudpspoof" "omuxsock"
+                       "pmaixforwardedfrom" "pmciscoios"
+                       "pmcisconames" "pmdb2diag"
+                       "pmlastmsg" "pmnormalize"
+                       "pmnull" "pmpanngfw" "pmsnare")))
+    (package
+      (name "rsyslog")
+      (version "8.2004.0")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/rsyslog/rsyslog.git")
+               (commit (string-append "v" version))))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0h40vvrjbxkvxy1sjqjwlyjfndj81llrisp7hkqm5j4mcl4pbzb3"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           ;; autogen.sh calls configure at the end of the script.
+           (replace 'bootstrap
+             (lambda _ (invoke "autoreconf" "-vfi")))
+           (add-after 'build 'transfer-modules
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (mod (string-append out "/lib/rsyslog"))
+                      (move-module
+                       (lambda (name)
+                         (let* ((new-dir (string-append
+                                          (assoc-ref outputs name)
+                                          "/lib/rsyslog")))
+                           (mkdir-p new-dir)
+                           (for-each
+                            (lambda (old-file)
+                              (let ((new-file
+                                     (string-append
+                                      new-dir
+                                      "/"
+                                      (basename old-file))))
+                                (write (string-append old-file " -> "
+                                                      new-file))
+                                (newline)
+                                (rename-file old-file new-file)))
+                            (find-files mod (string-append "^" name)))))))
+                 (for-each move-module (list ,@modules)))
+               #t)))
+         #:configure-flags
+         (list
+          "--enable-largefile"
+          "--enable-inet"
+          "--enable-regexp"
+          "--enable-rsyslogrt"
+          "--enable-rsyslogd"
+          "--enable-unlimited_select"
+          "--enable-uuid"
+          "--enable-libgcrypt"
+          "--enable-mmanon"
+          "--enable-mmcount"
+          "--enable-liblogging_stdlog"
+          "--enable-kafka_static"
+          "--enable-atomic_operations"
+          ;; Input plugins
+          "--enable-kmsg"
+          "--enable-imptcp"
+          "--enable-imdiag"
+          "--enable-imfile"
+          "--enable-imdocker"
+          "--enable-impstats"
+          "--enable-imczmq"
+          "--enable-imbatchreport"
+          "--enable-imkafka"
+          "--enable-imtuxedoulog"
+          "--enable-improg"
+          ;; Output plugins
+          "--enable-mail"
+          "--enable-omfile_hardened"
+          "--enable-omprog"
+          "--enable-omstdout"
+          "--enable-elasticsearch"
+          "--enable-clickhouse"
+          "--enable-omhttp"
+          "--enable-omruleset"
+          "--enable-omudpspoof"
+          "--enable-omuxsock"
+          "--enable-omczmq"
+          "--enable-omhttpfs"
+          "--enable-omtcl"
+          "--enable-omkafka"
+          ;; Parser Modules
+          "--enable-pmlastmsg"
+          "--enable-pmcisconames"
+          "--enable-pmciscoios"
+          "--enable-pmnull"
+          "--enable-pmnormalize"
+          "--enable-pmaixforwardedfrom"
+          "--enable-pmsnare"
+          "--enable-pmdb2diag"
+          "--enable-pmpanngfw"
+          ;; Message Modification Modules
+          "--enable-mmnormalize"
+          "--enable-mmjsonparse"
+          "--enable-mmaudit"
+          "--enable-mmsnmptrapd"
+          "--enable-mmutf8fix"
+          "--enable-mmrfc5424addhmac"
+          "--enable-mmpstrucdata"
+          "--enable-mmsequence"
+          "--enable-mmdblookup"
+          "--enable-mmdarwin"
+          "--enable-mmfields"
+          "--enable-mmrm1stspace"
+          "--enable-mmkubernetes"
+          "--enable-mmtaghostname"
+          ;; Database Support
+          "--enable-mysql"
+          "--enable-libdbi"
+          "--enable-pgsql"
+          ;; Protocol Support
+          "--enable-openssl"
+          "--enable-gnutls"
+          "--enable-gssapi_krb5"
+          "--enable-snmp"
+          ;; Function modules
+          "--enable-fmhttp"
+          "--enable-fmhash"
+          "--enable-fmhash_xxhash")))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("libtool" ,libtool)
+         ("pkg-config" ,pkg-config)
+         ("bison" ,bison)
+         ("flex" ,flex)))
+      (inputs
+       `(("libestr" ,libestr)
+         ("libfastjson" ,libfastjson)
+         ("liblogging" ,liblogging)
+         ("libz" ,zlib)
+         ("libuuid" ,util-linux "lib")
+         ("libgcrypt" ,libgcrypt)
+         ("libcurl" ,curl)
+         ("liblognorm" ,liblognorm "lib")
+         ("liblognorm" ,liblognorm "dev")
+         ("mariadb" ,mariadb "lib")
+         ("mariadb" ,mariadb "dev")
+         ("postgresql" ,postgresql)
+         ("libdbi" ,libdbi)
+         ("net-smnp" ,net-snmp)
+         ("openssl" ,openssl)
+         ("gnutls" ,gnutls)
+         ("libnet" ,libnet)
+         ("librdkafka" ,librdkafka)
+         ("lz4" ,lz4)
+         ("czmq" ,czmq)
+         ("zeromq" ,zeromq)
+         ("mit-krb5" ,mit-krb5)
+         ("cyrus-sasl" ,cyrus-sasl)
+         ("libmaxminddb" ,libmaxminddb)
+         ("tcl" ,tcl)))
+      (outputs `("out" ,@modules))
+      (home-page "https://www.rsyslog.com/")
+      (synopsis "RSYSLOG is the rocket-fast system for log processing")
+      (description
+       "It offers high-performance, great security features and a modular
+design.  While it started as a regular syslogd, rsyslog has evolved into a
+kind of swiss army knife of logging, being able to accept inputs from a wide
+variety of sources, transform them, and output to the results to diverse
+destinations.
+
+Rsyslog can deliver over one million messages per second to local
+destinations when limited processing is applied (based on v7, December
+2013).  Even with remote destinations and more elaborate processing the
+performance is usually considered \"stunning\".")
+      (license (list license:gpl3
+                     license:asl2.0
+                     license:lgpl3)))))
-- 
2.26.2


[-- Attachment #4: 0004-gnu-Add-liblognorm.patch --]
[-- Type: text/x-patch, Size: 3056 bytes --]

From 3667290c9d419ce5404d6a0631bf20ddbcf1c286 Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Tue, 2 Jun 2020 15:34:19 -0500
Subject: [PATCH 4/5] gnu: Add liblognorm.

* gnu/packages/c.scm (liblognorm): New variable.
---
 gnu/packages/c.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 98c939e76f..3a7914346e 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -46,6 +46,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
 
 (define-public tcc
@@ -442,3 +443,57 @@ be very fast in processing.")
      "Liblogging is an easy to use library for logging.  It offers an enhanced
 replacement for the syslog() call, but retains its ease of use.")
     (license license:bsd-2)))
+
+(define-public liblognorm
+  (package
+    (name "liblognorm")
+    (version "2.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/rsyslog/liblognorm.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1pyy1swvq6jj12aqma42jimv71z8m66zy6ydd5v19cp2azm4krml"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; Bash scripts interact with the filesystem
+     `(#:tests? #f
+       #:configure-flags
+       (list (string-append "--includedir="
+                            (assoc-ref %outputs "dev")
+                            "/include"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'fix-circular-dependency
+           (lambda* (#:key outputs #:allow-other-keys)
+             (write (string-append "KT: " (assoc-ref outputs "lib")
+                                   "/lib/pkgconfig"))
+             (write (string-append "KT: " (assoc-ref outputs "dev")
+                                   "/lib/pkgconfig"))
+             (let ((pkgconfig (string-append (assoc-ref outputs "dev")
+                                             "/lib/pkgconfig")))
+               (mkdir-p pkgconfig)
+               (rename-file (string-append (assoc-ref outputs "lib")
+                                           "/lib/pkgconfig")
+                            pkgconfig)))))))
+    (inputs
+     `(("libestr" ,libestr)
+       ("libfastjson" ,libfastjson)
+       ("json-c" ,json-c)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (outputs '("out" "lib" "dev"))
+    (home-page "https://www.liblognorm.com")
+    (synopsis
+     "Fast samples-based log normalization library")
+    (description
+     "Liblognorm normalizes event data into well-defined name-value
+pairs and a set of tags describing the message.")
+    (license license:lgpl2.1)))
-- 
2.26.2


[-- Attachment #5: 0002-gnu-Add-libfastjson.patch --]
[-- Type: text/x-patch, Size: 1888 bytes --]

From db4bcfc18e95fa39851c72414261b19b25c49db0 Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Tue, 2 Jun 2020 15:24:59 -0500
Subject: [PATCH 2/5] gnu: Add libfastjson.

* gnu/packages/c.scm (libfastjson): New variable.
---
 gnu/packages/c.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index d3820c88b2..307d8ca182 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -373,3 +373,35 @@ releases.")
      "A library which contains some essential string manipulation
 functions and more, like escaping special characters.")
     (license license:lgpl2.1)))
+
+(define-public libfastjson
+  (package
+    (name "libfastjson")
+    (version "0.99.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/rsyslog/libfastjson.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0qhs0g9slj3p0v2z4s3cnsx44msrlb4k78ljg7714qiziqbrbwyl"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (home-page "https://github.com/rsyslog/libfastjson")
+    (synopsis "Fast json library for C ")
+    (description
+     "libfastjson is a fork from json-c, and is currently under development.
+The aim of this project is not to provide a slightly modified clone of json-c.
+It's aim is to provide: a small library with essential json handling
+functions, sufficiently good json support (not 100% standards compliant), and
+be very fast in processing.")
+    (license
+     (license:non-copyleft
+      "https://github.com/rsyslog/libfastjson/blob/master/COPYING"
+      "It is a MIT license."))))
-- 
2.26.2


[-- Attachment #6: 0003-gnu-Add-liblogging.patch --]
[-- Type: text/x-patch, Size: 2243 bytes --]

From 9e0c24cc6e0666581b11b45f831ab49486adbdf8 Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Tue, 2 Jun 2020 15:29:08 -0500
Subject: [PATCH 3/5] gnu: Add liblogging.

* gnu/packages/c.scm (liblogging): New variable.
---
 gnu/packages/c.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 307d8ca182..98c939e76f 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -42,6 +42,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages pkg-config)
@@ -405,3 +406,39 @@ be very fast in processing.")
      (license:non-copyleft
       "https://github.com/rsyslog/libfastjson/blob/master/COPYING"
       "It is a MIT license."))))
+
+(define-public liblogging
+  (package
+    (name "liblogging")
+    (version "1.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/rsyslog/liblogging.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1l32m0y65svf5vxsgw935jnqs6842rcqr56dmzwqvr00yfrjhjkp"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; autogen.sh calls configure at the end of the script.
+         (replace 'bootstrap
+           (lambda _ (invoke "autoreconf" "-vfi"))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)
+       ;; For rst2man.py
+       ("python-docutils" ,python-docutils)))
+    (home-page "https://github.com/rsyslog/liblogging")
+    (synopsis
+     "Easy to use and lightweight signal-safe logging library")
+    (description
+     "Liblogging is an easy to use library for logging.  It offers an enhanced
+replacement for the syslog() call, but retains its ease of use.")
+    (license license:bsd-2)))
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#41688] Add rsyslog
  2020-06-03 14:29 [bug#41688] Add rsyslog Katherine Cox-Buday
@ 2020-06-12 16:45 ` Ludovic Courtès
  2021-12-31  9:22 ` bug#41688: [PATCH] " Ricardo Wurmus
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2020-06-12 16:45 UTC (permalink / raw)
  To: Katherine Cox-Buday; +Cc: 41688

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]

Hi Katherine,

Thanks for this long patch series!  I’ve applied half of it.  Here are
some comments:

Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:

> From 8d8d97441b397a48ae26761c2d826f35ae5d56e9 Mon Sep 17 00:00:00 2001
> From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
> Date: Tue, 2 Jun 2020 14:55:23 -0500
> Subject: [PATCH 1/5] gnu: Add libestr.
>
> * gnu/packages/c.scm (libestr): New variable.

Applied with the changes below.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 613 bytes --]

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index d3820c88b2..12a9b56c51 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -370,6 +370,6 @@ releases.")
     (home-page "https://github.com/rsyslog/libestr")
     (synopsis "Helper functions for handling strings")
     (description
-     "A library which contains some essential string manipulation
-functions and more, like escaping special characters.")
-    (license license:lgpl2.1)))
+     "This C library contains some essential string manipulation functions and
+more, like escaping special characters.")
+    (license license:lgpl2.1+)))

[-- Attachment #3: Type: text/plain, Size: 5638 bytes --]


> From 0e0e9cc550ff002d7bebb4f93b573c5ba527ac4d Mon Sep 17 00:00:00 2001
> From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
> Date: Tue, 2 Jun 2020 15:47:41 -0500
> Subject: [PATCH 5/5] gnu: Add rsyslog.
>
> * gnu/packages/logging.scm (rsyslog): New variable.

[...]

> +(define-public rsyslog
> +  (let ((modules (list "fmhash" "fmhttp" "imbatchreport"
> +                       "imczmq" "imdiag" "imdocker"
> +                       "imfile" "imgssapi" "imkafka"
> +                       "imklog" "imkmsg" "immark"
> +                       "improg" "impstats" "imptcp" "imtcp"
> +                       "imtuxedoulog" "imudp" "imuxsock"
> +                       "mmanon" "mmaudit" "mmcount"
> +                       "mmdblookup" "mmexternal"
> +                       "mmfields" "mmjsonparse"
> +                       "mmkubernetes" "mmnormalize"
> +                       "mmpstrucdata" "mmrfc5424addhmac"
> +                       "mmrm1stspace" "mmsequence"
> +                       "mmsnmptrapd" "mmtaghostname"
> +                       "mmutf8fix" "omclickhouse"
> +                       "omczmq" "omelasticsearch"
> +                       "omfile-hardened" "omgssapi"
> +                       "omhttpfs" "omhttp" "omkafka"
> +                       "omlibdbi" "ommail" "ommysql" "ompgsql"
> +                       "omprog" "omruleset" "omsnmp"
> +                       "omstdout" "omtcl" "omtesting"
> +                       "omudpspoof" "omuxsock"
> +                       "pmaixforwardedfrom" "pmciscoios"
> +                       "pmcisconames" "pmdb2diag"
> +                       "pmlastmsg" "pmnormalize"
> +                       "pmnull" "pmpanngfw" "pmsnare")))

Could you add a comment explaining where this list comes from?
Alternatively, do you think it could be generated at build time?

> +         #:configure-flags
> +         (list
> +          "--enable-largefile"
> +          "--enable-inet"
> +          "--enable-regexp"
> +          "--enable-rsyslogrt"
> +          "--enable-rsyslogd"

That’s also a very long list.  :-)

Can we rely on defaults?  Or, alternatively, could you add a comment
explaining how to come up with the list?

> +      (outputs `("out" ,@modules))

Oh.  Is it a good idea to have one output per module?  We’ve never done
such a thing before.  Usually, extra outputs are justified if not having
them would lead to a big closure (as reported by ‘guix size’).  The
solution is usually to have two or three outputs, but not 20ish.  :-)

WDYT?

> +      (home-page "https://www.rsyslog.com/")
> +      (synopsis "RSYSLOG is the rocket-fast system for log processing")
> +      (description
> +       "It offers high-performance, great security features and a modular

s/It/Rsyslog/

> +      (license (list license:gpl3
> +                     license:asl2.0
> +                     license:lgpl3)))))

Please add a comment above explaining if it’s triple-licensing or a
combination, and possibly add missing ‘+’ signs.

> From 3667290c9d419ce5404d6a0631bf20ddbcf1c286 Mon Sep 17 00:00:00 2001
> From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
> Date: Tue, 2 Jun 2020 15:34:19 -0500
> Subject: [PATCH 4/5] gnu: Add liblognorm.
>
> * gnu/packages/c.scm (liblognorm): New variable.

[...]

> +    (arguments
> +     ;; Bash scripts interact with the filesystem
> +     `(#:tests? #f

Could you clarify what this means with regards to running tests?

> +       #:configure-flags
> +       (list (string-append "--includedir="
> +                            (assoc-ref %outputs "dev")
> +                            "/include"))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'fix-circular-dependency
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (write (string-append "KT: " (assoc-ref outputs "lib")
> +                                   "/lib/pkgconfig"))
> +             (write (string-append "KT: " (assoc-ref outputs "dev")
> +                                   "/lib/pkgconfig"))

Leftovers.  :-)

> +             (let ((pkgconfig (string-append (assoc-ref outputs "dev")
> +                                             "/lib/pkgconfig")))
> +               (mkdir-p pkgconfig)
> +               (rename-file (string-append (assoc-ref outputs "lib")
> +                                           "/lib/pkgconfig")
> +                            pkgconfig)))))))

Missing #t return value.

> +    (outputs '("out" "lib" "dev"))

“dev” is not part of the output names conventionally used.  However,
there’s “include”, which is automatically recognized by gnu-build-system
and turned into a ‘--includedir’ flag.  Perhaps you could try this?

Or you can just have “out” and “lib”: so far, unless headers are very
large, we just keep them alongside the library.

> +    (home-page "https://www.liblognorm.com")
> +    (synopsis
> +     "Fast samples-based log normalization library")
> +    (description
> +     "Liblognorm normalizes event data into well-defined name-value
> +pairs and a set of tags describing the message.")
> +    (license license:lgpl2.1)))

Could it be lgpl2.1+?  (I haven’t checked.)

> From db4bcfc18e95fa39851c72414261b19b25c49db0 Mon Sep 17 00:00:00 2001
> From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
> Date: Tue, 2 Jun 2020 15:24:59 -0500
> Subject: [PATCH 2/5] gnu: Add libfastjson.
>
> * gnu/packages/c.scm (libfastjson): New variable.

Applied with minor changes.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Type: text/x-patch, Size: 1147 bytes --]

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index e935042572..2e62111d44 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -394,14 +394,9 @@ more, like escaping special characters.")
        ("automake" ,automake)
        ("libtool" ,libtool)))
     (home-page "https://github.com/rsyslog/libfastjson")
-    (synopsis "Fast json library for C ")
+    (synopsis "Fast JSON library for C")
     (description
-     "libfastjson is a fork from json-c, and is currently under development.
-The aim of this project is not to provide a slightly modified clone of json-c.
-It's aim is to provide: a small library with essential json handling
-functions, sufficiently good json support (not 100% standards compliant), and
-be very fast in processing.")
-    (license
-     (license:non-copyleft
-      "https://github.com/rsyslog/libfastjson/blob/master/COPYING"
-      "It is a MIT license."))))
+     "libfastjson is a fork from json-c aiming to provide: a small library
+with essential JSON handling functions, sufficiently good JSON support (not
+100% standards compliant), and very fast processing.")
+    (license license:expat)))

[-- Attachment #5: Type: text/plain, Size: 311 bytes --]


> From 9e0c24cc6e0666581b11b45f831ab49486adbdf8 Mon Sep 17 00:00:00 2001
> From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
> Date: Tue, 2 Jun 2020 15:29:08 -0500
> Subject: [PATCH 3/5] gnu: Add liblogging.
>
> * gnu/packages/c.scm (liblogging): New variable.

Applied.

Thank you!

Ludo’.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#41688: [PATCH] Add rsyslog
  2020-06-03 14:29 [bug#41688] Add rsyslog Katherine Cox-Buday
  2020-06-12 16:45 ` Ludovic Courtès
@ 2021-12-31  9:22 ` Ricardo Wurmus
  2022-01-05 20:04   ` [bug#41688] " Katherine Cox-Buday
  1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2021-12-31  9:22 UTC (permalink / raw)
  To: 41688-done; +Cc: Katherine Cox-Buday

Hi,

I’ve followed Ludo’s suggestions for the remaining package definitions
and pushed the result to the “master” branch.

Among the changes:

- fixed and clarified licenses
- removed per-module outputs
- removed default configure flags and added a comment about enabling
  optional features
- enabled tests
- removed “dev” output
- used new input style

Now I guess we’ll need an rsyslog service :)

Thank you, Katherine, for the patches and your patience!

-- 
Ricardo




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#41688] [PATCH] Add rsyslog
  2021-12-31  9:22 ` bug#41688: [PATCH] " Ricardo Wurmus
@ 2022-01-05 20:04   ` Katherine Cox-Buday
  2022-01-05 20:51     ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Katherine Cox-Buday @ 2022-01-05 20:04 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 41688-done

Ricardo Wurmus <rekado@elephly.net> writes:

> I’ve followed Ludo’s suggestions for the remaining package definitions
> and pushed the result to the “master” branch.

Thank you so much, Ricardo!

It is my fault for letting this sit, but I think we should unbundle the outputs once more -- even if they must become separate packages.

As you know, rsyslog is meant to forward (egress) and receive (ingress) syslog logs, and it does so through these plug-ins. For ingress, I don't think this package is necessarily a problem, but systems that want to forward logs may have very limited resources (e.g. I have a wifi repeater that forwards logs). I didn't want to require things like PostgreSQL and MySQL, dependencies required by ingress, on egress.

A secondary concern is that a package like rsyslog becomes quite sticky since there are lots and lots of modules, and I imagine the Guix closure becomes quite big.

> Among the changes:
>
> - fixed and clarified licenses
> - removed per-module outputs
> - removed default configure flags and added a comment about enabling
>   optional features
> - enabled tests
> - removed “dev” output
> - used new input style
>
> Now I guess we’ll need an rsyslog service :)

I'm working[1] on it! Although it is frustrating at how little time I have to dedicate to things like this :(

> Thank you, Katherine, for the patches and your patience!

Likewise, thank you for your contributions and getting this landed. Cheers!

[1] - https://github.com/kat-co/guix-channels/blob/upstream-staging/upstream/services/rsyslog.scm

-- 
Katherine




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#41688] [PATCH] Add rsyslog
  2022-01-05 20:04   ` [bug#41688] " Katherine Cox-Buday
@ 2022-01-05 20:51     ` Ricardo Wurmus
  0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2022-01-05 20:51 UTC (permalink / raw)
  To: Katherine Cox-Buday; +Cc: 41688-done


Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:

> I think we should unbundle the outputs once more -- even if they must
> become separate packages.

If we can build the plugins separately (and arrange for rsyslog to find
them via some search path) I’d be happy to see them moved to their own
packages.  Having them as separate outputs would only help a little as
you’d still need to have *all* the inputs ready to build the thing, even
if you just want to use one of the many plugins.

>> Now I guess we’ll need an rsyslog service :)
>
> I'm working[1] on it! Although it is frustrating at how little time I have to dedicate to things like this :(

Excellent, I’m looking forward to a service!  Perhaps we could also use
the existing syslog service with it if that service allows us to pass a
plain configuration file.  It should already let us swap out the syslog
package.

-- 
Ricardo




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-05 20:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 14:29 [bug#41688] Add rsyslog Katherine Cox-Buday
2020-06-12 16:45 ` Ludovic Courtès
2021-12-31  9:22 ` bug#41688: [PATCH] " Ricardo Wurmus
2022-01-05 20:04   ` [bug#41688] " Katherine Cox-Buday
2022-01-05 20:51     ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).