lol

Merge pull request #187873 from SuperSandro2000/rsyslog

authored by

Sandro and committed by
GitHub
a00c8f26 0d7222c9

+186 -170
+160 -85
pkgs/tools/system/rsyslog/default.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, autoreconfHook, libestr, json_c, zlib, docutils, fastJson 2 - , libkrb5 ? null, systemd ? null, jemalloc ? null, libmysqlclient ? null, postgresql ? null 3 - , libdbi ? null, net-snmp ? null, libuuid ? null, curl ? null, gnutls ? null 4 - , libgcrypt ? null, liblognorm ? null, openssl ? null, librelp ? null, libksi ? null 5 - , liblogging ? null, libnet ? null, hadoop ? null, rdkafka ? null 6 - , libmongo-client ? null, czmq ? null, rabbitmq-c ? null, hiredis ? null, mongoc ? null 7 - , libmaxminddb ? null 8 - , nixosTests ? null 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , pkg-config 5 + , autoreconfHook 6 + , libestr 7 + , json_c 8 + , zlib 9 + , docutils 10 + , fastJson 11 + , withKrb5 ? true 12 + , libkrb5 13 + , withSystemd ? stdenv.isLinux 14 + , systemd 15 + , withJemalloc ? true 16 + , jemalloc 17 + , withMysql ? true 18 + , libmysqlclient 19 + , withPostgres ? true 20 + , postgresql 21 + , withDbi ? true 22 + , libdbi 23 + , withNetSnmp ? true 24 + , net-snmp 25 + , withUuid ? true 26 + , libuuid 27 + , withCurl ? true 28 + , curl 29 + , withGnutls ? true 30 + , gnutls 31 + , withGcrypt ? true 32 + , libgcrypt 33 + , withLognorm ? true 34 + , liblognorm 35 + , withMaxminddb ? true 36 + , libmaxminddb 37 + , withOpenssl ? true 38 + , openssl 39 + , withRelp ? true 40 + , librelp 41 + , withKsi ? true 42 + , libksi 43 + , withLogging ? true 44 + , liblogging 45 + , withNet ? true 46 + , libnet 47 + , withHadoop ? true 48 + , hadoop 49 + , withRdkafka ? true 50 + , rdkafka 51 + , withMongo ? true 52 + , libmongo-client 53 + , mongoc 54 + , withCzmq ? true 55 + , czmq 56 + , withRabbitmq ? true 57 + , rabbitmq-c 58 + , withHiredis ? true 59 + , hiredis 60 + , nixosTests 9 61 }: 10 62 11 - with lib; 12 63 stdenv.mkDerivation rec { 13 64 pname = "rsyslog"; 14 65 version = "8.2208.0"; ··· 18 69 sha256 = "sha256-FN5o57jlqwxdc0+C4tyf/yLNf0cQrWkHJ+sQp7mz314="; 19 70 }; 20 71 21 - #patches = [ ./fix-gnutls-detection.patch ]; 22 - 23 72 nativeBuildInputs = [ pkg-config autoreconfHook ]; 24 73 buildInputs = [ 25 - fastJson libestr json_c zlib docutils libkrb5 jemalloc 26 - postgresql libdbi net-snmp libuuid curl gnutls libgcrypt liblognorm openssl 27 - librelp libksi liblogging libnet hadoop rdkafka libmongo-client czmq 28 - rabbitmq-c hiredis mongoc libmaxminddb 29 - ] ++ lib.optional (libmysqlclient != null) libmysqlclient 30 - ++ lib.optional stdenv.isLinux systemd; 74 + fastJson 75 + libestr 76 + json_c 77 + zlib 78 + docutils 79 + ] ++ lib.optional withKrb5 libkrb5 80 + ++ lib.optional withJemalloc jemalloc 81 + ++ lib.optional withPostgres postgresql 82 + ++ lib.optional withDbi libdbi 83 + ++ lib.optional withNetSnmp net-snmp 84 + ++ lib.optional withUuid libuuid 85 + ++ lib.optional withCurl curl 86 + ++ lib.optional withGnutls gnutls 87 + ++ lib.optional withGcrypt libgcrypt 88 + ++ lib.optional withLognorm liblognorm 89 + ++ lib.optional withOpenssl openssl 90 + ++ lib.optional withRelp librelp 91 + ++ lib.optional withKsi libksi 92 + ++ lib.optional withLogging liblogging 93 + ++ lib.optional withNet libnet 94 + ++ lib.optional withHadoop hadoop 95 + ++ lib.optional withRdkafka rdkafka 96 + ++ lib.optionals withMongo [ libmongo-client mongoc ] 97 + ++ lib.optional withCzmq czmq 98 + ++ lib.optional withRabbitmq rabbitmq-c 99 + ++ lib.optional withHiredis hiredis 100 + ++ lib.optional withMaxminddb libmaxminddb 101 + ++ lib.optional withMysql libmysqlclient 102 + ++ lib.optional withSystemd systemd; 31 103 32 - configureFlags = [ 104 + configureFlags = with lib; [ 33 105 "--sysconfdir=/etc" 34 106 "--localstatedir=/var" 35 107 "--with-systemdsystemunitdir=\${out}/etc/systemd/system" 36 - (enableFeature true "largefile") 37 - (enableFeature true "regexp") 38 - (enableFeature (libkrb5 != null) "gssapi-krb5") 39 - (enableFeature true "klog") 40 - (enableFeature true "kmsg") 41 - (enableFeature (systemd != null) "imjournal") 42 - (enableFeature true "inet") 43 - (enableFeature (jemalloc != null) "jemalloc") 44 - (enableFeature true "unlimited-select") 45 - (enableFeature false "debug") 46 - (enableFeature false "debug-symbols") 47 - (enableFeature true "debugless") 48 - (enableFeature false "valgrind") 49 - (enableFeature false "diagtools") 50 - (enableFeature true "usertools") 51 - (enableFeature (libmysqlclient != null) "mysql") 52 - (enableFeature (postgresql != null) "pgsql") 53 - (enableFeature (libdbi != null) "libdbi") 54 - (enableFeature (net-snmp != null) "snmp") 55 - (enableFeature (libuuid != null) "uuid") 56 - (enableFeature (curl != null) "elasticsearch") 57 - (enableFeature (gnutls != null) "gnutls") 58 - (enableFeature (libgcrypt != null) "libgcrypt") 59 - (enableFeature true "rsyslogrt") 60 - (enableFeature true "rsyslogd") 61 - (enableFeature true "mail") 62 - (enableFeature (liblognorm != null) "mmnormalize") 63 - (enableFeature (libmaxminddb != null) "mmdblookup") 64 - (enableFeature true "mmjsonparse") 65 - (enableFeature true "mmaudit") 66 - (enableFeature true "mmanon") 67 - (enableFeature true "mmutf8fix") 68 - (enableFeature true "mmcount") 69 - (enableFeature true "mmsequence") 70 - (enableFeature true "mmfields") 71 - (enableFeature true "mmpstrucdata") 72 - (enableFeature (openssl != null) "mmrfc5424addhmac") 73 - (enableFeature (librelp != null) "relp") 74 - (enableFeature (libksi != null) "ksi-ls12") 75 - (enableFeature (liblogging != null) "liblogging-stdlog") 76 - (enableFeature (liblogging != null) "rfc3195") 77 - (enableFeature true "imfile") 78 - (enableFeature false "imsolaris") 79 - (enableFeature true "imptcp") 80 - (enableFeature true "impstats") 81 - (enableFeature true "omprog") 82 - (enableFeature (libnet != null) "omudpspoof") 83 - (enableFeature true "omstdout") 84 - (enableFeature (systemd != null) "omjournal") 85 - (enableFeature true "pmlastmsg") 86 - (enableFeature true "pmcisconames") 87 - (enableFeature true "pmciscoios") 88 - (enableFeature true "pmaixforwardedfrom") 89 - (enableFeature true "pmsnare") 90 - (enableFeature true "omruleset") 91 - (enableFeature true "omuxsock") 92 - (enableFeature true "mmsnmptrapd") 93 - (enableFeature (hadoop != null) "omhdfs") 94 - (enableFeature (rdkafka != null) "omkafka") 95 - (enableFeature (libmongo-client != null) "ommongodb") 96 - (enableFeature (czmq != null) "imczmq") 97 - (enableFeature (czmq != null) "omczmq") 98 - (enableFeature (rabbitmq-c != null) "omrabbitmq") 99 - (enableFeature (hiredis != null) "omhiredis") 100 - (enableFeature (curl != null) "omhttpfs") 101 - (enableFeature true "generate-man-pages") 108 + (enableFeature true "largefile") 109 + (enableFeature true "regexp") 110 + (enableFeature withKrb5 "gssapi-krb5") 111 + (enableFeature true "klog") 112 + (enableFeature true "kmsg") 113 + (enableFeature withSystemd "imjournal") 114 + (enableFeature true "inet") 115 + (enableFeature withJemalloc "jemalloc") 116 + (enableFeature true "unlimited-select") 117 + (enableFeature withCurl "clickhouse") 118 + (enableFeature false "debug") 119 + (enableFeature false "debug-symbols") 120 + (enableFeature true "debugless") 121 + (enableFeature false "valgrind") 122 + (enableFeature false "diagtools") 123 + (enableFeature withCurl "fmhttp") 124 + (enableFeature true "usertools") 125 + (enableFeature withMysql "mysql") 126 + (enableFeature withPostgres "pgsql") 127 + (enableFeature withDbi "libdbi") 128 + (enableFeature withNetSnmp "snmp") 129 + (enableFeature withUuid "uuid") 130 + (enableFeature withCurl "elasticsearch") 131 + (enableFeature withGnutls "gnutls") 132 + (enableFeature withGcrypt "libgcrypt") 133 + (enableFeature true "rsyslogrt") 134 + (enableFeature true "rsyslogd") 135 + (enableFeature true "mail") 136 + (enableFeature withLognorm "mmnormalize") 137 + (enableFeature withMaxminddb "mmdblookup") 138 + (enableFeature true "mmjsonparse") 139 + (enableFeature true "mmaudit") 140 + (enableFeature true "mmanon") 141 + (enableFeature true "mmutf8fix") 142 + (enableFeature true "mmcount") 143 + (enableFeature true "mmsequence") 144 + (enableFeature true "mmfields") 145 + (enableFeature true "mmpstrucdata") 146 + (enableFeature withOpenssl "mmrfc5424addhmac") 147 + (enableFeature withRelp "relp") 148 + (enableFeature withKsi "ksi-ls12") 149 + (enableFeature withLogging "liblogging-stdlog") 150 + (enableFeature withLogging "rfc3195") 151 + (enableFeature true "imfile") 152 + (enableFeature false "imsolaris") 153 + (enableFeature true "imptcp") 154 + (enableFeature true "impstats") 155 + (enableFeature true "omprog") 156 + (enableFeature withNet "omudpspoof") 157 + (enableFeature true "omstdout") 158 + (enableFeature withSystemd "omjournal") 159 + (enableFeature true "pmlastmsg") 160 + (enableFeature true "pmcisconames") 161 + (enableFeature true "pmciscoios") 162 + (enableFeature true "pmaixforwardedfrom") 163 + (enableFeature true "pmsnare") 164 + (enableFeature true "omruleset") 165 + (enableFeature true "omuxsock") 166 + (enableFeature true "mmsnmptrapd") 167 + (enableFeature withHadoop "omhdfs") 168 + (enableFeature withRdkafka "omkafka") 169 + (enableFeature withMongo "ommongodb") 170 + (enableFeature withCzmq "imczmq") 171 + (enableFeature withCzmq "omczmq") 172 + (enableFeature withRabbitmq "omrabbitmq") 173 + (enableFeature withHiredis "omhiredis") 174 + (enableFeature withCurl "omhttp") 175 + (enableFeature true "generate-man-pages") 102 176 ]; 103 177 104 178 passthru.tests = { 105 179 nixos-rsyslogd = nixosTests.rsyslogd; 106 180 }; 107 181 108 - meta = { 182 + meta = with lib; { 109 183 homepage = "https://www.rsyslog.com/"; 110 184 description = "Enhanced syslog implementation"; 111 185 changelog = "https://raw.githubusercontent.com/rsyslog/rsyslog/v${version}/ChangeLog"; 112 186 license = licenses.gpl3; 113 187 platforms = platforms.linux; 188 + maintainers = with maintainers; [ ]; 114 189 }; 115 190 }
-60
pkgs/tools/system/rsyslog/fix-gnutls-detection.patch
··· 1 - From 588b4ca7412326abd51a5b2060eafbc04611e419 Mon Sep 17 00:00:00 2001 2 - From: Radovan Sroka <rsroka@redhat.com> 3 - Date: Tue, 11 Aug 2015 17:09:15 +0200 4 - Subject: [PATCH] Fix detection of the GnuTLS package 5 - 6 - This commit fixes a number of issues that cropped up from these changes: 7 - 23c5b3e replace deprecated GnuTLS functions with newer ones if available 8 - 88f0651 bugfix: ommysql did not work when gnutls was enabled 9 - ce560b6 build system: Failure action in AC_CHECK_LIB check for 10 - 11 - The solution is based on the assumption that the call to AC_CHECK_LIB() 12 - was added purely to satisfy the subsequent calls to AC_CHECK_FUNCS(). 13 - 23c5b3e had the unintentional result of libgnutls being added to LIBS 14 - and linked to undesired components. 15 - The next commit removed libgnutls from LIBS which made the following 16 - calls to AC_CHECK_FUNCS() nonfunctional. 17 - Another commit made the processing not stop upon detecting a missing 18 - component which, again, makes the calls to AC_CHECK_FUNCS() malfunction. 19 - 20 - The solution is to get rid of AC_CHECK_LIB() and temporarily override 21 - LIBS for use by AC_CHECK_FUNCS(). 22 - --- 23 - configure.ac | 14 ++++---------- 24 - 1 file changed, 4 insertions(+), 10 deletions(-) 25 - 26 - diff --git a/configure.ac b/configure.ac 27 - index 6f82f0c..ba3f791 100644 28 - --- a/configure.ac 29 - +++ b/configure.ac 30 - @@ -763,18 +763,13 @@ AC_ARG_ENABLE(gnutls, 31 - if test "x$enable_gnutls" = "xyes"; then 32 - PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.0) 33 - AC_DEFINE([ENABLE_GNUTLS], [1], [Indicator that GnuTLS is present]) 34 - - AC_CHECK_LIB( 35 - - [gnutls], 36 - - [gnutls_global_init], 37 - - [ 38 - - AC_DEFINE(HAVE_LIB_GNUTLS, 1, [gnutls is available]) 39 - - ], 40 - - [AC_MSG_WARN([gnutls_global_init function missing or not detected])], 41 - - [] 42 - - ) 43 - + save_libs=$LIBS 44 - + LIBS="$LIBS $GNUTLS_LIBS" 45 - AC_CHECK_FUNCS(gnutls_certificate_set_retrieve_function,,) 46 - AC_CHECK_FUNCS(gnutls_certificate_type_set_priority,,) 47 - + LIBS=$save_libs 48 - fi 49 - + 50 - AM_CONDITIONAL(ENABLE_GNUTLS, test x$enable_gnutls = xyes) 51 - 52 - # libgcrypt support 53 - @@ -1655,7 +1650,6 @@ else 54 - AC_MSG_NOTICE([Not running from git source]) 55 - fi 56 - 57 - - 58 - AM_CONDITIONAL(ENABLE_GENERATE_MAN_PAGES, test x$have_to_generate_man_pages = xyes) 59 - 60 - # rst2man
+26 -25
pkgs/top-level/all-packages.nix
··· 4742 4742 rsbep = callPackage ../tools/backup/rsbep { }; 4743 4743 4744 4744 rsyslog = callPackage ../tools/system/rsyslog { 4745 - hadoop = null; # Currently Broken 4746 - libksi = null; # Currently Broken 4745 + withHadoop = false; # Currently Broken 4746 + withKsi = false; # Currently Broken 4747 4747 }; 4748 4748 4749 4749 rsyslog-light = rsyslog.override { 4750 - libkrb5 = null; 4751 - systemd = null; 4752 - jemalloc = null; 4753 - libmysqlclient = null; 4754 - postgresql = null; 4755 - libdbi = null; 4756 - net-snmp = null; 4757 - libuuid = null; 4758 - gnutls = null; 4759 - libgcrypt = null; 4760 - liblognorm = null; 4761 - openssl = null; 4762 - librelp = null; 4763 - libksi = null; 4764 - liblogging = null; 4765 - libnet = null; 4766 - hadoop = null; 4767 - rdkafka = null; 4768 - libmongo-client = null; 4769 - czmq = null; 4770 - rabbitmq-c = null; 4771 - hiredis = null; 4772 - libmaxminddb = null; 4750 + withKrb5 = false; 4751 + withSystemd = false; 4752 + withJemalloc = false; 4753 + withMysql = false; 4754 + withPostgres = false; 4755 + withDbi = false; 4756 + withNetSnmp = false; 4757 + withUuid = false; 4758 + withCurl = false; 4759 + withGnutls = false; 4760 + withGcrypt = false; 4761 + withLognorm = false; 4762 + withMaxminddb = false; 4763 + withOpenssl = false; 4764 + withRelp = false; 4765 + withKsi = false; 4766 + withLogging = false; 4767 + withNet = false; 4768 + withHadoop = false; 4769 + withRdkafka = false; 4770 + withMongo = false; 4771 + withCzmq = false; 4772 + withRabbitmq = false; 4773 + withHiredis = false; 4773 4774 }; 4774 4775 4775 4776 rtrtr = callPackage ../servers/rtrtr {