Gentoo Archives: gentoo-commits

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