1 |
commit: 11bf36377f51303256cc2b4d363b147dfda80bea |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 7 21:26:06 2019 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 7 21:26:06 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11bf3637 |
7 |
|
8 |
app-admin/sagan: Fix mysql dependencies |
9 |
|
10 |
Bug: https://bugs.gentoo.org/665814 |
11 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
12 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
13 |
|
14 |
app-admin/sagan/files/mysql_check.patch | 4 +- |
15 |
app-admin/sagan/sagan-0.2.3-r1.ebuild | 85 ++++++++++++++++++++++++++++ |
16 |
app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild | 94 +++++++++++++++++++++++++++++++ |
17 |
3 files changed, 181 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/app-admin/sagan/files/mysql_check.patch b/app-admin/sagan/files/mysql_check.patch |
20 |
index d2247aab571..37f7d61fa0c 100644 |
21 |
--- a/app-admin/sagan/files/mysql_check.patch |
22 |
+++ b/app-admin/sagan/files/mysql_check.patch |
23 |
@@ -16,8 +16,8 @@ rename to configure.ac |
24 |
- AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing! |
25 |
-If you're not interested in MySQL support use the --disable-mysql flag.)) |
26 |
- fi |
27 |
-+ LIBS=$(mysql_config --libs_r) |
28 |
-+ AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!)) |
29 |
++ LIBS=$(mysql_config --libs) |
30 |
++ AC_CHECK_LIB(mysqlclient, main,,AC_MSG_ERROR(The MySQL library libmysqlclient is missing!)) |
31 |
+fi |
32 |
+LIBS="$save_LIBS $LIBS" |
33 |
+ |
34 |
|
35 |
diff --git a/app-admin/sagan/sagan-0.2.3-r1.ebuild b/app-admin/sagan/sagan-0.2.3-r1.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..99142b74181 |
38 |
--- /dev/null |
39 |
+++ b/app-admin/sagan/sagan-0.2.3-r1.ebuild |
40 |
@@ -0,0 +1,85 @@ |
41 |
+# Copyright 1999-2019 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=5 |
45 |
+ |
46 |
+AUTOTOOLS_AUTORECONF=1 |
47 |
+AUTOTOOLS_IN_SOURCE_BUILD=1 |
48 |
+ |
49 |
+inherit eutils autotools-utils user |
50 |
+ |
51 |
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system" |
52 |
+HOMEPAGE="http://sagan.quadrantsec.com/" |
53 |
+SRC_URI="http://sagan.quadrantsec.com/download/${P}.tar.gz" |
54 |
+ |
55 |
+LICENSE="GPL-2" |
56 |
+SLOT="0" |
57 |
+KEYWORDS="~amd64 ~x86" |
58 |
+IUSE="+libdnet +lognorm mysql +pcap postgres smtp snort" |
59 |
+ |
60 |
+RDEPEND="dev-libs/libpcre |
61 |
+ app-admin/sagan-rules[lognorm?] |
62 |
+ smtp? ( net-libs/libesmtp ) |
63 |
+ pcap? ( net-libs/libpcap ) |
64 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
65 |
+ postgres? ( dev-db/postgresql:* ) |
66 |
+ lognorm? ( dev-libs/liblognorm ) |
67 |
+ libdnet? ( dev-libs/libdnet ) |
68 |
+ snort? ( >=net-analyzer/snortsam-2.50 ) |
69 |
+ " |
70 |
+ |
71 |
+DEPEND="virtual/pkgconfig |
72 |
+ ${RDEPEND}" |
73 |
+ |
74 |
+DOCS=( AUTHORS ChangeLog FAQ INSTALL README NEWS TODO ) |
75 |
+PATCHES=( "${FILESDIR}"/mysql_check.patch ) |
76 |
+ |
77 |
+pkg_setup() { |
78 |
+ enewgroup sagan |
79 |
+ enewuser sagan -1 -1 /dev/null sagan |
80 |
+} |
81 |
+ |
82 |
+src_configure() { |
83 |
+ local myeconfargs=( |
84 |
+ $(use_enable mysql) |
85 |
+ $(use_enable postgres postgresql) |
86 |
+ $(use_enable smtp esmtp) |
87 |
+ $(use_enable lognorm) |
88 |
+ $(use_enable libdnet) |
89 |
+ $(use_enable pcap libpcap) |
90 |
+ $(use_enable snort snortsam) |
91 |
+ --disable-prelude |
92 |
+ ) |
93 |
+ |
94 |
+ autotools-utils_src_configure |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ autotools-utils_src_install |
99 |
+ |
100 |
+ diropts -g sagan -o sagan -m 775 |
101 |
+ |
102 |
+ dodir /var/log/sagan |
103 |
+ |
104 |
+ keepdir /var/log/sagan |
105 |
+ |
106 |
+ touch "${ED}"/var/log/sagan/sagan.log |
107 |
+ chown sagan.sagan "${ED}"/var/log/sagan/sagan.log |
108 |
+ |
109 |
+ newinitd "${FILESDIR}"/sagan.init sagan |
110 |
+ newconfd "${FILESDIR}"/sagan.confd sagan |
111 |
+ |
112 |
+ insinto /usr/share/doc/${PF}/examples |
113 |
+ doins -r extra/* |
114 |
+} |
115 |
+ |
116 |
+pkg_postinst() { |
117 |
+ if use smtp; then |
118 |
+ ewarn "You have enabled smtp use flag. If you plan on using Sagan with" |
119 |
+ ewarn "email, create valid writable home directory for user 'sagan'" |
120 |
+ ewarn "For security reasons it was created with /dev/null home directory" |
121 |
+ fi |
122 |
+ |
123 |
+ einfo "For configuration assistance see" |
124 |
+ einfo "http://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO" |
125 |
+} |
126 |
|
127 |
diff --git a/app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild b/app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild |
128 |
new file mode 100644 |
129 |
index 00000000000..4156492fe77 |
130 |
--- /dev/null |
131 |
+++ b/app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild |
132 |
@@ -0,0 +1,94 @@ |
133 |
+# Copyright 1999-2019 Gentoo Authors |
134 |
+# Distributed under the terms of the GNU General Public License v2 |
135 |
+ |
136 |
+EAPI=5 |
137 |
+ |
138 |
+AUTOTOOLS_AUTORECONF=1 |
139 |
+AUTOTOOLS_IN_SOURCE_BUILD=1 |
140 |
+ |
141 |
+inherit eutils autotools-utils user |
142 |
+ |
143 |
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system" |
144 |
+HOMEPAGE="http://sagan.quadrantsec.com/" |
145 |
+SRC_URI="http://sagan.quadrantsec.com/download/sagan-1.0.0RC3.tar.gz" |
146 |
+ |
147 |
+LICENSE="GPL-2" |
148 |
+SLOT="0" |
149 |
+KEYWORDS="~amd64 ~x86" |
150 |
+IUSE="geoip +libdnet +lognorm mysql +pcap smtp snort" |
151 |
+ |
152 |
+RDEPEND="dev-libs/libpcre |
153 |
+ app-admin/sagan-rules[lognorm?] |
154 |
+ smtp? ( net-libs/libesmtp ) |
155 |
+ pcap? ( net-libs/libpcap ) |
156 |
+ lognorm? ( |
157 |
+ dev-libs/liblognorm |
158 |
+ dev-libs/json-c:= |
159 |
+ dev-libs/libee |
160 |
+ dev-libs/libestr |
161 |
+ ) |
162 |
+ libdnet? ( dev-libs/libdnet ) |
163 |
+ snort? ( >=net-analyzer/snortsam-2.50 ) |
164 |
+ geoip? ( dev-libs/geoip ) |
165 |
+ " |
166 |
+ |
167 |
+DEPEND="virtual/pkgconfig |
168 |
+ ${RDEPEND}" |
169 |
+ |
170 |
+# Package no longer logs directly to a database |
171 |
+# and relies on Unified2 format to accomplish it |
172 |
+RDEPEND="${RDEPEND} mysql? ( net-analyzer/barnyard2[mysql] )" |
173 |
+ |
174 |
+REQUIRED_USE="mysql? ( libdnet )" |
175 |
+ |
176 |
+DOCS=( AUTHORS ChangeLog FAQ INSTALL README NEWS TODO ) |
177 |
+PATCHES=( "${FILESDIR}"/${PN}-1.0.0-liblognorm-json-c.patch ) |
178 |
+S="${WORKDIR}/sagan-1.0.0RC3/" |
179 |
+ |
180 |
+pkg_setup() { |
181 |
+ enewgroup sagan |
182 |
+ enewuser sagan -1 -1 /dev/null sagan |
183 |
+} |
184 |
+ |
185 |
+src_configure() { |
186 |
+ local myeconfargs=( |
187 |
+ $(use_enable smtp esmtp) |
188 |
+ $(use_enable lognorm) |
189 |
+ $(use_enable libdnet) |
190 |
+ $(use_enable pcap libpcap) |
191 |
+ $(use_enable snort snortsam) |
192 |
+ $(use_enable geoip) |
193 |
+ ) |
194 |
+ |
195 |
+ autotools-utils_src_configure |
196 |
+} |
197 |
+ |
198 |
+src_install() { |
199 |
+ autotools-utils_src_install |
200 |
+ |
201 |
+ diropts -g sagan -o sagan -m 775 |
202 |
+ |
203 |
+ dodir /var/log/sagan |
204 |
+ |
205 |
+ keepdir /var/log/sagan |
206 |
+ |
207 |
+ touch "${ED}"/var/log/sagan/sagan.log |
208 |
+ chown sagan.sagan "${ED}"/var/log/sagan/sagan.log |
209 |
+ |
210 |
+ newinitd "${FILESDIR}"/sagan.init-r1 sagan |
211 |
+ newconfd "${FILESDIR}"/sagan.confd sagan |
212 |
+ |
213 |
+ insinto /usr/share/doc/${PF}/examples |
214 |
+ doins -r extra/* |
215 |
+} |
216 |
+ |
217 |
+pkg_postinst() { |
218 |
+ if use smtp; then |
219 |
+ ewarn "You have enabled smtp use flag. If you plan on using Sagan with" |
220 |
+ ewarn "email, create valid writable home directory for user 'sagan'" |
221 |
+ ewarn "For security reasons it was created with /dev/null home directory" |
222 |
+ fi |
223 |
+ |
224 |
+ einfo "For configuration assistance see" |
225 |
+ einfo "http://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO" |
226 |
+} |