1 |
commit: 0140b6a984244cf0ca79878be814e8c7811ae059 |
2 |
Author: Vladimir Pavljuchenkov (SpiderX) <spiderx <AT> spiderx <DOT> dp <DOT> ua> |
3 |
AuthorDate: Mon Aug 1 07:23:06 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 17 16:43:27 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0140b6a9 |
7 |
|
8 |
net-analyzer/goaccess: version bump to 1.6.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/842240 |
11 |
|
12 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
13 |
Signed-off-by: Vladimir Pavljuchenkov <spiderx <AT> spiderx.dp.ua> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/26693 |
15 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
16 |
|
17 |
net-analyzer/goaccess/Manifest | 1 + |
18 |
net-analyzer/goaccess/files/goaccess.confd | 8 ++++ |
19 |
net-analyzer/goaccess/files/goaccess.initd | 14 ++++++ |
20 |
net-analyzer/goaccess/files/goaccess.service | 15 ++++++ |
21 |
net-analyzer/goaccess/files/goaccess.tmpfile | 1 + |
22 |
net-analyzer/goaccess/goaccess-1.6.2.ebuild | 70 ++++++++++++++++++++++++++++ |
23 |
6 files changed, 109 insertions(+) |
24 |
|
25 |
diff --git a/net-analyzer/goaccess/Manifest b/net-analyzer/goaccess/Manifest |
26 |
index 8449602d0ea3..66d5ef3979d3 100644 |
27 |
--- a/net-analyzer/goaccess/Manifest |
28 |
+++ b/net-analyzer/goaccess/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
DIST goaccess-1.4.2.tar.gz 633162 BLAKE2B 4da268bb051114893b480e4eef18e007ccffb9b61ae49cc9a96622864716a44793f0895b5d27685e1b5e22c33f1bdd256dc148d26c7b6fefbd982a3f8fdf1960 SHA512 14bc5a08c2e6bb1db8d664a224b778603a358cf3a52a341a3a3e04e84337d0bb574892cb5005dc62098a8a6f0a834d1014479c29593714fdd6a87cedb3f3fb38 |
31 |
+DIST goaccess-1.6.2.tar.gz 658679 BLAKE2B 93aea3e4142ec2fa8ea4b1600bac4bcdf28f845904935c1b2e88e720e3ba342fd07f7f22ac05b8010932263e708ecdf6c516f901b690532a395e337494a69486 SHA512 5299df01fd06777bf85da12e4d4ec3b9eca866bbab6cac64f3d674b0b3ecc90dc4c28f5bc2c94064b7654d381aa873626e98ec9f26fc2b546380bb9e40077a85 |
32 |
|
33 |
diff --git a/net-analyzer/goaccess/files/goaccess.confd b/net-analyzer/goaccess/files/goaccess.confd |
34 |
new file mode 100644 |
35 |
index 000000000000..4ff75a1a4ff6 |
36 |
--- /dev/null |
37 |
+++ b/net-analyzer/goaccess/files/goaccess.confd |
38 |
@@ -0,0 +1,8 @@ |
39 |
+# Config file for /etc/init.d/goaccess |
40 |
+ |
41 |
+# Various options. |
42 |
+# run `goaccess --help` for valid cmdline options |
43 |
+OPTS="--user-name=goaccess --pid-file=/run/goaccess/goaccess.pid -o /var/lib/goaccess/goaccess.html -l /var/log/goaccess/goaccess.log" |
44 |
+ |
45 |
+# GoAccess config file |
46 |
+#CONFIG="/etc/goaccess/goaccess.conf" |
47 |
|
48 |
diff --git a/net-analyzer/goaccess/files/goaccess.initd b/net-analyzer/goaccess/files/goaccess.initd |
49 |
new file mode 100644 |
50 |
index 000000000000..be0059588396 |
51 |
--- /dev/null |
52 |
+++ b/net-analyzer/goaccess/files/goaccess.initd |
53 |
@@ -0,0 +1,14 @@ |
54 |
+#!/sbin/openrc-run |
55 |
+# Copyright 1999-2022 Gentoo Authors |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+command="/usr/bin/goaccess" |
59 |
+name="GoAccess" |
60 |
+description="Real-time web log analyzer" |
61 |
+config="${CONFIG:-/etc/goaccess/goaccess.conf}" |
62 |
+command_args="--real-time-html --daemonize -p $config ${OPTS}" |
63 |
+start_stop_daemon_args="-q" |
64 |
+ |
65 |
+depend() { |
66 |
+ need net |
67 |
+} |
68 |
|
69 |
diff --git a/net-analyzer/goaccess/files/goaccess.service b/net-analyzer/goaccess/files/goaccess.service |
70 |
new file mode 100644 |
71 |
index 000000000000..8fab5f9b7c56 |
72 |
--- /dev/null |
73 |
+++ b/net-analyzer/goaccess/files/goaccess.service |
74 |
@@ -0,0 +1,15 @@ |
75 |
+[Unit] |
76 |
+Description=Real-time web log analyzer |
77 |
+After=network.target |
78 |
+ |
79 |
+[Service] |
80 |
+Type=simple |
81 |
+User=root |
82 |
+Group=root |
83 |
+Restart=always |
84 |
+ExecStart=/usr/bin/goaccess --real-time-html --daemonize -p /etc/goaccess/goaccess.conf --user-name=goaccess -o /var/lib/goaccess/goaccess.html -l /var/log/goaccess/goaccess.log |
85 |
+StandardOutput=null |
86 |
+StandardError=null |
87 |
+ |
88 |
+[Install] |
89 |
+WantedBy=multi-user.target |
90 |
|
91 |
diff --git a/net-analyzer/goaccess/files/goaccess.tmpfile b/net-analyzer/goaccess/files/goaccess.tmpfile |
92 |
new file mode 100644 |
93 |
index 000000000000..caee9ffff853 |
94 |
--- /dev/null |
95 |
+++ b/net-analyzer/goaccess/files/goaccess.tmpfile |
96 |
@@ -0,0 +1 @@ |
97 |
+d /run/goaccess 0755 goaccess goaccess |
98 |
|
99 |
diff --git a/net-analyzer/goaccess/goaccess-1.6.2.ebuild b/net-analyzer/goaccess/goaccess-1.6.2.ebuild |
100 |
new file mode 100644 |
101 |
index 000000000000..036459cecdb8 |
102 |
--- /dev/null |
103 |
+++ b/net-analyzer/goaccess/goaccess-1.6.2.ebuild |
104 |
@@ -0,0 +1,70 @@ |
105 |
+# Copyright 1999-2022 Gentoo Authors |
106 |
+# Distributed under the terms of the GNU General Public License v2 |
107 |
+ |
108 |
+EAPI=8 |
109 |
+ |
110 |
+inherit autotools systemd tmpfiles |
111 |
+ |
112 |
+DESCRIPTION="A real-time web log analyzer and interactive viewer in a terminal" |
113 |
+HOMEPAGE="https://goaccess.io" |
114 |
+SRC_URI="https://tar.goaccess.io/${P}.tar.gz" |
115 |
+ |
116 |
+LICENSE="MIT" |
117 |
+SLOT="0" |
118 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux" |
119 |
+IUSE="debug geoip geoipv2 getline ssl unicode" |
120 |
+REQUIRED_USE="geoipv2? ( geoip )" |
121 |
+ |
122 |
+RDEPEND="acct-user/goaccess |
123 |
+ sys-libs/ncurses:=[unicode(+)?] |
124 |
+ geoip? ( |
125 |
+ !geoipv2? ( dev-libs/geoip ) |
126 |
+ geoipv2? ( dev-libs/libmaxminddb:0= ) |
127 |
+ ) |
128 |
+ ssl? ( dev-libs/openssl:0= )" |
129 |
+DEPEND="${RDEPEND}" |
130 |
+BDEPEND="virtual/pkgconfig" |
131 |
+ |
132 |
+src_prepare() { |
133 |
+ default |
134 |
+ |
135 |
+ # Enable log-format, define log file and db path, |
136 |
+ # change path to GeoIP bases in config |
137 |
+ sed -i -e '/log-format COMBINED/s/#//' \ |
138 |
+ -e '/log-file/s/#//' \ |
139 |
+ -e '/db-path/s|tmp|var/lib/goaccess|' \ |
140 |
+ -e '/geoip-database/s|local/||' config/goaccess.conf \ |
141 |
+ || die "sed failed for goaccess.conf" |
142 |
+ |
143 |
+ eautoreconf |
144 |
+} |
145 |
+ |
146 |
+src_configure() { |
147 |
+ econf \ |
148 |
+ "$(use_enable debug)" \ |
149 |
+ "$(use_enable geoip geoip "$(usex geoipv2 mmdb legacy)")" \ |
150 |
+ "$(use_enable unicode utf8)" \ |
151 |
+ "$(use_with getline)" \ |
152 |
+ "$(use_with ssl openssl)" |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ default |
157 |
+ |
158 |
+ newinitd "${FILESDIR}"/goaccess.initd goaccess |
159 |
+ newconfd "${FILESDIR}"/goaccess.confd goaccess |
160 |
+ systemd_dounit "${FILESDIR}"/goaccess.service |
161 |
+ newtmpfiles "${FILESDIR}"/goaccess.tmpfile goaccess.conf |
162 |
+ |
163 |
+ diropts -o goaccess -g goaccess -m 0700 |
164 |
+ keepdir /var/lib/goaccess/db /var/log/goaccess |
165 |
+} |
166 |
+ |
167 |
+pkg_postinst() { |
168 |
+ if ! has_version net-misc/geoipupdate ; then |
169 |
+ einfo "You should consider to install net-misc/geoipupdate" |
170 |
+ einfo "to be able to use GeoIP databases" |
171 |
+ fi |
172 |
+ |
173 |
+ tmpfiles_process goaccess.conf |
174 |
+} |