Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/ulogd/
Date: Tue, 30 Aug 2016 16:29:30
Message-Id: 1472574557.b5dc1a218613e74ab551ed5f524b33ed608f38b3.monsieurp@gentoo
1 commit: b5dc1a218613e74ab551ed5f524b33ed608f38b3
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Sun Aug 28 02:50:32 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 30 16:29:17 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5dc1a21
7
8 app-admin/ulogd: verbump to 2.0.5_p20160331.
9
10 Fixes cross-compilation problems with mysql/postgesql plugins.
11 Also convert ebuild to EAPI=6 and cleanup slightly.
12
13 Closes: https://github.com/gentoo/gentoo/pull/2152
14 Package-Manager: portage-2.3.0
15
16 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
17
18 app-admin/ulogd/Manifest | 1 +
19 app-admin/ulogd/ulogd-2.0.5_p20160331.ebuild | 143 +++++++++++++++++++++++++++
20 2 files changed, 144 insertions(+)
21
22 diff --git a/app-admin/ulogd/Manifest b/app-admin/ulogd/Manifest
23 index 134f0e2..bbfb394 100644
24 --- a/app-admin/ulogd/Manifest
25 +++ b/app-admin/ulogd/Manifest
26 @@ -1 +1,2 @@
27 DIST ulogd-2.0.5_p20160205.tar.gz 137899 SHA256 d6ece155270aaaea2f78740c00ae679f04e42fd90b4b7c2f342c2dddeb414ee4 SHA512 99c824fcb404f2f4d7b1bd4d8c9231a1a61121f9ae88901d8d30b33172c1f24e44abd37c30ea71722078b543b58c57a6bc99d64e2a655a5af73fe6edf37c72ab WHIRLPOOL 5c3013fc0b0b8d9209d69aac2b25255c9067167ae3c66a73a36f0ee391dc1b6b482f36b786aa57f361c19d5d26da99ab376c3093c460bc02f3764276e0e7f77a
28 +DIST ulogd-2.0.5_p20160331.tar.gz 137930 SHA256 285b68dfd4974315874a1b08bd1d672cca79ecc946acd61cb6e655b6013e88c1 SHA512 531dd37df93ec1638af56ea39f47435b53d0729340333e05b7692f7f55f9ff809b8df3889c1250991cfc8252d341bfe6c3bf581973c89066ca8c298355e83f7c WHIRLPOOL 33d7f8c8de4e09a80cbcbe932ecf9292817ee15b5df23b90c9c2995973d427737ace05b40e8460f07a95b5614596d5f2f88bcd2ef8291d240fad2bd056d8f9b0
29
30 diff --git a/app-admin/ulogd/ulogd-2.0.5_p20160331.ebuild b/app-admin/ulogd/ulogd-2.0.5_p20160331.ebuild
31 new file mode 100644
32 index 00000000..07d1fa2
33 --- /dev/null
34 +++ b/app-admin/ulogd/ulogd-2.0.5_p20160331.ebuild
35 @@ -0,0 +1,143 @@
36 +# Copyright 1999-2016 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Id$
39 +
40 +EAPI=6
41 +
42 +COMMIT_ID="2c3dbe92b5eab4702ced403e4f6c030249a308c2"
43 +
44 +inherit autotools eutils flag-o-matic linux-info readme.gentoo-r1 systemd user vcs-snapshot
45 +
46 +DESCRIPTION="A userspace logging daemon for netfilter/iptables related logging"
47 +HOMEPAGE="https://netfilter.org/projects/ulogd/index.html"
48 +SRC_URI="http://git.netfilter.org/${PN}2/snapshot/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~ia64 ~ppc ~x86"
53 +IUSE="dbi doc json mysql nfacct +nfct +nflog pcap postgres sqlite -ulog"
54 +
55 +RDEPEND="
56 + || ( net-firewall/iptables net-firewall/nftables )
57 + >=net-libs/libnfnetlink-1.0.1
58 + dbi? ( dev-db/libdbi )
59 + json? ( dev-libs/jansson )
60 + nfacct? (
61 + >=net-libs/libmnl-1.0.3
62 + >=net-libs/libnetfilter_acct-1.0.1
63 + )
64 + nfct? ( >=net-libs/libnetfilter_conntrack-1.0.2 )
65 + nflog? ( >=net-libs/libnetfilter_log-1.0.0 )
66 + mysql? ( virtual/mysql )
67 + pcap? ( net-libs/libpcap )
68 + postgres? ( dev-db/postgresql:= )
69 + sqlite? ( dev-db/sqlite:3 )
70 +"
71 +DEPEND="${RDEPEND}
72 + doc? (
73 + app-text/linuxdoc-tools
74 + app-text/texlive-core
75 + dev-texlive/texlive-fontsrecommended
76 + virtual/latex-base
77 + )
78 +"
79 +
80 +DISABLE_AUTOFORMATTING=1
81 +DOC_CONTENTS="
82 +You must have at least one logging stack enabled to make ulogd work.
83 +Please edit the example configuration located at '${EPREFIX}/etc/ulogd.conf'.
84 +"
85 +
86 +pkg_setup() {
87 + linux-info_pkg_setup
88 +
89 + if kernel_is lt 2 6 14; then
90 + die "${PN} requires a kernel >= 2.6.14."
91 + fi
92 +
93 + if use nfacct && kernel_is lt 3 3 0; then
94 + ewarn "NFACCT input plugin requires a kernel >= 3.3."
95 + fi
96 +
97 + if use ulog && kernel_is ge 3 17 0; then
98 + ewarn "ULOG target has been removed in the 3.17 kernel release."
99 + ewarn "Consider enabling NFACCT, NFCT, or NFLOG support instead."
100 + fi
101 +
102 + enewgroup ulogd
103 + enewuser ulogd -1 -1 /var/log/ulogd ulogd
104 +}
105 +
106 +src_prepare() {
107 + default_src_prepare
108 +
109 + # Change default settings to:
110 + # - keep log files in /var/log/ulogd instead of /var/log;
111 + # - create sockets in /run instead of /tmp.
112 + sed -i \
113 + -e "s|var/log|var/log/${PN}|g" \
114 + -e 's|tmp|run|g' \
115 + ulogd.conf.in || die
116 +
117 + eautoreconf
118 +}
119 +
120 +src_configure() {
121 + append-lfs-flags
122 + local myeconfargs=(
123 + $(use_with dbi)
124 + $(use_with json jansson)
125 + $(use_enable nfacct)
126 + $(use_enable nfct)
127 + $(use_enable nflog)
128 + $(use_with mysql)
129 + $(use_with pcap)
130 + $(use_with postgres pgsql)
131 + $(use_with sqlite)
132 + $(use_enable ulog)
133 + )
134 + econf "${myeconfargs[@]}"
135 +}
136 +
137 +src_compile() {
138 + default_src_compile
139 +
140 + if use doc; then
141 + # Prevent access violations from bitmap font files generation.
142 + export VARTEXFONTS="${T}/fonts"
143 + emake -C doc
144 + fi
145 +}
146 +
147 +src_install() {
148 + use doc && HTML_DOCS=( doc/${PN}.html )
149 +
150 + default_src_install
151 + prune_libtool_files --modules
152 + readme.gentoo_create_doc
153 +
154 + doman ${PN}.8
155 +
156 + use doc && dodoc doc/${PN}.{dvi,ps,txt}
157 + use mysql && dodoc doc/mysql-*.sql
158 + use postgres && dodoc doc/pgsql-*.sql
159 + use sqlite && dodoc doc/sqlite3.table
160 +
161 + insinto /etc
162 + doins ${PN}.conf
163 + fowners root:ulogd /etc/${PN}.conf
164 + fperms 640 /etc/${PN}.conf
165 +
166 + newinitd "${FILESDIR}/${PN}.init" ${PN}
167 + systemd_dounit "${FILESDIR}/${PN}.service"
168 +
169 + insinto /etc/logrotate.d
170 + newins "${FILESDIR}/${PN}.logrotate" ${PN}
171 +
172 + diropts -o ulogd -g ulogd
173 + keepdir /var/log/ulogd
174 +}
175 +
176 +pkg_postinst() {
177 + readme.gentoo_print_elog
178 +}