diff options
author | fesoj000 <fesoj000@gmail.com> | 2022-03-27 00:34:31 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-11 13:51:07 +0200 |
commit | b805ea194a61b249572aef05d06741c0bfb696eb (patch) | |
tree | 7439583a436400c1b88a93d992fb06b7a8edd44f /gnu | |
parent | 2a1908b48cdd127988083d3a5fb939e679bc3d17 (diff) | |
download | guix-patches-b805ea194a61b249572aef05d06741c0bfb696eb.tar guix-patches-b805ea194a61b249572aef05d06741c0bfb696eb.tar.gz |
gnu: Add ulogd
* gnu/packages/linux.scm (ulogd): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/linux.scm | 86 |
1 files changed, 85 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 6d699e0528..e3b72326d1 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -97,8 +97,9 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages compression) - #:use-module (gnu packages dbm) + #:use-module (gnu packages databases) #:use-module (gnu packages datastructures) + #:use-module (gnu packages dbm) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) @@ -7537,6 +7538,89 @@ receiving to-be-logged packets from the kernel nfnetlink_log subsystem (supported-systems (filter target-linux? %supported-systems)) (license license:gpl2+))) +(define-public ulogd + (package + (name "ulogd") + (version "2.0.7") + (source + (origin + (method url-fetch) + (uri (string-append "https://netfilter.org/projects/" name + "/files/ulogd-" version ".tar.bz2")) + (sha256 + (base32 + "0ax9959c4bapq78n13bbaibcf1gwjir3ngx8l2dh45lw9m4ha2lr")))) + (build-system gnu-build-system) + (outputs '("out" + ;; additonal non-default output plugins + "json" "pcap" "sqlite3" "pgsql" "mysql")) + (native-inputs (list pkg-config)) + (inputs (list libnfnetlink + libmnl + libnetfilter-log + libnetfilter-conntrack + libnetfilter-acct + sqlite + libpcap + jansson + postgresql + mysql + zlib + openssl)) + (arguments + (list #:configure-flags + #~(list (string-append "--with-pgsql=" + (assoc-ref %build-inputs "postgresql")) + (string-append "--with-mysql=" + (assoc-ref %build-inputs "mysql"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-doc + (lambda _ + (let ((out-etc (string-append #$output "/etc")) + (ulogd.conf "ulogd.conf")) + (mkdir-p out-etc) + (copy-file ulogd.conf (string-append out-etc "/" + ulogd.conf))))) + (add-after 'install 'setup-plugin-outputs + (lambda* (#:key outputs #:allow-other-keys) + (with-directory-excursion + (string-append #$output "/lib/ulogd/") + (for-each + (lambda (output-name) + (let ((output-dir (string-append + (assoc-ref outputs output-name) + "/lib/ulogd/"))) + (mkdir-p output-dir) + (for-each + (lambda (plugin) + (copy-file plugin (string-append output-dir plugin)) + (delete-file plugin)) + (find-files "." + (string-append "ulogd_output_" + (string-upcase output-name) + ".*$"))))) + (list "json" "pcap" "sqlite3" "pgsql" "mysql")))))))) + (synopsis "Logging daemon for netfilter and iptables") + (description "ulogd is a userspace logging daemon for netfilter/iptables +related logging. This includes per-packet logging of security violations, +per-packet logging for accounting, per-flow logging and flexible user-defined +accounting. + +@enumerate +@item +Packet and flow-based traffic accounting +@item +Flexible user-defined traffic accounting via nfacct infrastructure +@item +SQL database back-end support: SQLite3, PostgreSQL, MySQL +@item +Text-based output formats: CSV, XML, Netfilter's LOG, Netfilter's conntrack +@end enumerate") + (home-page "https://netfilter.org/projects/nfacct/index.html") + (supported-systems (filter target-linux? %supported-systems)) + (license license:gpl2))) + (define-public proot (package (name "proot") |