1 |
commit: 1963b3b1e434fb6d0adf16e5740de3bd966d3fda |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Oct 4 19:22:21 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 5 21:39:29 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1963b3b1 |
7 |
|
8 |
app-admin/ulogd: migrate to dev-db/mysql-connector-c for mysql |
9 |
|
10 |
Also drop deprecated ltprune eclass. |
11 |
Straight to stable since it's trivial changes only. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/665816 |
14 |
Signed-off-by: Ilya Tumaykin <itumaykin <AT> gmail.com> |
15 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
16 |
Closes: https://github.com/gentoo/gentoo/pull/10067 |
17 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
18 |
|
19 |
app-admin/ulogd/ulogd-2.0.7-r1.ebuild | 137 ++++++++++++++++++++++++++++++++++ |
20 |
1 file changed, 137 insertions(+) |
21 |
|
22 |
diff --git a/app-admin/ulogd/ulogd-2.0.7-r1.ebuild b/app-admin/ulogd/ulogd-2.0.7-r1.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..073eac95b56 |
25 |
--- /dev/null |
26 |
+++ b/app-admin/ulogd/ulogd-2.0.7-r1.ebuild |
27 |
@@ -0,0 +1,137 @@ |
28 |
+# Copyright 1999-2018 Gentoo Authors |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=6 |
32 |
+ |
33 |
+inherit flag-o-matic linux-info readme.gentoo-r1 systemd user |
34 |
+ |
35 |
+DESCRIPTION="A userspace logging daemon for netfilter/iptables related logging" |
36 |
+HOMEPAGE="https://netfilter.org/projects/ulogd/index.html" |
37 |
+SRC_URI="https://www.netfilter.org/projects/ulogd/files/${P}.tar.bz2" |
38 |
+ |
39 |
+LICENSE="GPL-2" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="amd64 ~ia64 ppc x86" |
42 |
+IUSE="dbi doc json mysql nfacct +nfct +nflog pcap postgres selinux sqlite ulog" |
43 |
+ |
44 |
+COMMON_DEPEND=" |
45 |
+ || ( net-firewall/iptables net-firewall/nftables ) |
46 |
+ >=net-libs/libnfnetlink-1.0.1 |
47 |
+ dbi? ( dev-db/libdbi ) |
48 |
+ json? ( dev-libs/jansson ) |
49 |
+ nfacct? ( |
50 |
+ >=net-libs/libmnl-1.0.3 |
51 |
+ >=net-libs/libnetfilter_acct-1.0.1 |
52 |
+ ) |
53 |
+ nfct? ( >=net-libs/libnetfilter_conntrack-1.0.2 ) |
54 |
+ nflog? ( >=net-libs/libnetfilter_log-1.0.0 ) |
55 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
56 |
+ pcap? ( net-libs/libpcap ) |
57 |
+ postgres? ( dev-db/postgresql:= ) |
58 |
+ sqlite? ( dev-db/sqlite:3 ) |
59 |
+" |
60 |
+DEPEND="${COMMON_DEPEND} |
61 |
+ doc? ( |
62 |
+ app-text/linuxdoc-tools |
63 |
+ app-text/texlive-core |
64 |
+ dev-texlive/texlive-fontsrecommended |
65 |
+ virtual/latex-base |
66 |
+ ) |
67 |
+" |
68 |
+RDEPEND="${COMMON_DEPEND} |
69 |
+ selinux? ( sec-policy/selinux-ulogd ) |
70 |
+" |
71 |
+ |
72 |
+DISABLE_AUTOFORMATTING=1 |
73 |
+DOC_CONTENTS=" |
74 |
+You must have at least one logging stack enabled to make ulogd work. |
75 |
+Please edit the example configuration located at '${EPREFIX}/etc/ulogd.conf'. |
76 |
+" |
77 |
+ |
78 |
+pkg_setup() { |
79 |
+ linux-info_pkg_setup |
80 |
+ |
81 |
+ if use nfacct && kernel_is lt 3 3 0; then |
82 |
+ ewarn "NFACCT input plugin requires a kernel >= 3.3." |
83 |
+ fi |
84 |
+ |
85 |
+ if use ulog && kernel_is ge 3 17 0; then |
86 |
+ ewarn "ULOG target has been removed in the 3.17 kernel release." |
87 |
+ ewarn "Consider enabling NFACCT, NFCT, or NFLOG support instead." |
88 |
+ fi |
89 |
+ |
90 |
+ enewgroup ulogd |
91 |
+ enewuser ulogd -1 -1 /var/log/ulogd ulogd |
92 |
+} |
93 |
+ |
94 |
+src_prepare() { |
95 |
+ default_src_prepare |
96 |
+ |
97 |
+ # Change default settings to: |
98 |
+ # - keep log files in /var/log/ulogd instead of /var/log; |
99 |
+ # - create sockets in /run instead of /tmp. |
100 |
+ sed -i \ |
101 |
+ -e "s|var/log|var/log/${PN}|g" \ |
102 |
+ -e 's|tmp|run|g' \ |
103 |
+ ulogd.conf.in || die |
104 |
+} |
105 |
+ |
106 |
+src_configure() { |
107 |
+ append-lfs-flags |
108 |
+ local myeconfargs=( |
109 |
+ $(use_with dbi) |
110 |
+ $(use_with json jansson) |
111 |
+ $(use_enable nfacct) |
112 |
+ $(use_enable nfct) |
113 |
+ $(use_enable nflog) |
114 |
+ $(use_with mysql) |
115 |
+ $(use_with pcap) |
116 |
+ $(use_with postgres pgsql) |
117 |
+ $(use_with sqlite) |
118 |
+ $(use_enable ulog) |
119 |
+ ) |
120 |
+ econf "${myeconfargs[@]}" |
121 |
+} |
122 |
+ |
123 |
+src_compile() { |
124 |
+ default_src_compile |
125 |
+ |
126 |
+ if use doc; then |
127 |
+ # Prevent access violations from bitmap font files generation. |
128 |
+ export VARTEXFONTS="${T}/fonts" |
129 |
+ emake -C doc |
130 |
+ fi |
131 |
+} |
132 |
+ |
133 |
+src_install() { |
134 |
+ use doc && HTML_DOCS=( doc/${PN}.html ) |
135 |
+ |
136 |
+ default_src_install |
137 |
+ find "${D}" -name '*.la' -delete || die |
138 |
+ |
139 |
+ readme.gentoo_create_doc |
140 |
+ doman ${PN}.8 |
141 |
+ |
142 |
+ use doc && dodoc doc/${PN}.{dvi,ps,txt} |
143 |
+ use mysql && dodoc doc/mysql-*.sql |
144 |
+ use postgres && dodoc doc/pgsql-*.sql |
145 |
+ use sqlite && dodoc doc/sqlite3.table |
146 |
+ |
147 |
+ insinto /etc |
148 |
+ doins ${PN}.conf |
149 |
+ fowners root:ulogd /etc/${PN}.conf |
150 |
+ fperms 640 /etc/${PN}.conf |
151 |
+ |
152 |
+ newinitd "${FILESDIR}/${PN}.init" ${PN} |
153 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
154 |
+ |
155 |
+ insinto /etc/logrotate.d |
156 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
157 |
+ |
158 |
+ diropts -o ulogd -g ulogd |
159 |
+ keepdir /var/log/ulogd |
160 |
+} |
161 |
+ |
162 |
+pkg_postinst() { |
163 |
+ readme.gentoo_print_elog |
164 |
+} |