Add rsyslog
(address . guix-patches@gnu.org)
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(+)
Toggle diff (51 lines)
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
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(+)
Toggle diff (72 lines)
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
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(+)
Toggle diff (42 lines)
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
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(+)
Toggle diff (54 lines)
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