Gentoo Archives: gentoo-commits

From: Alexys Jacob <ultrabug@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/ultrabug:master commit in: app-admin/nxlog-ce/files/, licenses/, app-admin/nxlog-ce/
Date: Wed, 01 Jun 2016 06:41:24
Message-Id: 1464763263.10547a21006ad786ea3d365764056871d43508d2.ultrabug@gentoo
1 commit: 10547a21006ad786ea3d365764056871d43508d2
2 Author: Ultrabug <ultrabug <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 1 06:41:03 2016 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 1 06:41:03 2016 +0000
6 URL: https://gitweb.gentoo.org/dev/ultrabug.git/commit/?id=10547a21
7
8 app-admin/nxlog-ce: new ebuild
9
10 app-admin/nxlog-ce/Manifest | 3 +
11 app-admin/nxlog-ce/files/nxlog.initd | 45 ++++++++++++++
12 app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild | 69 ++++++++++++++++++++++
13 licenses/NXLOG-1 | 92 +++++++++++++++++++++++++++++
14 4 files changed, 209 insertions(+)
15
16 diff --git a/app-admin/nxlog-ce/Manifest b/app-admin/nxlog-ce/Manifest
17 new file mode 100644
18 index 0000000..ae87ccc
19 --- /dev/null
20 +++ b/app-admin/nxlog-ce/Manifest
21 @@ -0,0 +1,3 @@
22 +AUX nxlog.initd 858 SHA256 efb4694690f49e0bde016fb99df239d92a050358ac963993bfc8f0bd4d995a06 SHA512 8879a280258e5b8394ec57e0c3079ba4a5248e6b16caeaaec4f6d299a5622690244b9f09fbc48b5bc874a6ef935b5a7c343acd8f10e345a012f2b7a76f259411 WHIRLPOOL fd8972f07b38249646257464e6a1d4c5b747b2c69f38353321429cf154d064a01b6fced7e55876cd9189ac1a044a989cf73af0798b0d711faf828810041341ac
23 +DIST nxlog-ce-2.8.1248.tar.gz 2552618 SHA256 13c8e41ed7a41cd529822a54c7f7b8f44b7022e6ce870f1161a173a7930d890e SHA512 1cb31421f0a17c09ba5fc187dde8ffbe913bc176eaece7d9f614432ce857f8632c294e12fa8a0f1bfa3eff93d8ea5a4e76b281d67ba624b3bc47dd7775ea65dc WHIRLPOOL e89465ae9b870f78410a2af48e90bc33eafa2be78580365b4c1fa1c9f3d22c24383d0c9c8f41ca9e078521719e02fbf2e90c6070a640e7c8c12be0a503ca6997
24 +EBUILD nxlog-ce-2.8.1248.ebuild 1544 SHA256 2b7baf5b7f3005c07d8bb0ac1604ca5b7a1942d6c6dab089b5f4057d772bc942 SHA512 7f06c881dd05999e77b25e51e17e4720e3fe5e5ab799812f1c3407bfb7c299f43a91f9c076aeb891c4985279eb0ba951d8a5cbda4557edaf563ed54659b413a4 WHIRLPOOL 8cb64a3f4a7f8678922fb0716efaab3431bbd49e71af287ee1d5f9e230e93a19f96594863dd82fd1a06ecf830ba4fbcb9c1ca9ca143a9845ef998e9130b46941
25
26 diff --git a/app-admin/nxlog-ce/files/nxlog.initd b/app-admin/nxlog-ce/files/nxlog.initd
27 new file mode 100644
28 index 0000000..33490e3
29 --- /dev/null
30 +++ b/app-admin/nxlog-ce/files/nxlog.initd
31 @@ -0,0 +1,45 @@
32 +#!/sbin/openrc-run
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +config_file=${config_file:-/etc/nxlog/${SVCNAME}.conf}
38 +run_dir=${run_dir:-/run/nxlog}
39 +
40 +command="/usr/bin/nxlog"
41 +command_args="-c ${config_file}"
42 +pidfile=${run_dir}/${SVCNAME}.pid
43 +user=${user:-nxlog}
44 +group=${group:-nxlog}
45 +
46 +extra_started_commands="${opts} reload"
47 +
48 +depend() {
49 + use net
50 +}
51 +
52 +check_config() {
53 + ${command} ${command_args} -v >/dev/null
54 + return $?
55 +}
56 +
57 +start_pre() {
58 + checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
59 + if [ ! -f ${config_file} ]; then
60 + eerror "Missing configuration file ${config_file}"
61 + return 1
62 + fi
63 + check_config
64 + return $?
65 +}
66 +
67 +reload() {
68 + ebegin "Reloading ${SVCNAME}"
69 + check_config
70 + if [ $? == 0 ]; then
71 + ${command} ${command_args} -r
72 + eend $?
73 + else
74 + eend 1
75 + fi
76 +}
77
78 diff --git a/app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild b/app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild
79 new file mode 100644
80 index 0000000..46a1d57
81 --- /dev/null
82 +++ b/app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild
83 @@ -0,0 +1,69 @@
84 +# Copyright 1999-2016 Gentoo Foundation
85 +# Distributed under the terms of the GNU General Public License v2
86 +# $Id$
87 +
88 +EAPI="6"
89 +
90 +inherit autotools user
91 +
92 +MY_PN="nxlog"
93 +
94 +DESCRIPTION="Universal log collector and forwarder supporting different platforms"
95 +HOMEPAGE="http://nxlog.org"
96 +SRC_URI="http://nxlog.org/system/files/products/files/1/${P}.tar.gz"
97 +
98 +LICENSE="NXLOG-1"
99 +SLOT="0"
100 +KEYWORDS="~amd64 ~x86"
101 +IUSE="perl static-libs"
102 +
103 +DEPEND=""
104 +RDEPEND="${DEPEND}"
105 +
106 +pkg_setup() {
107 + enewgroup nxlog
108 + enewuser nxlog -1 -1 /var/lib/${MY_PN} "adm,nxlog"
109 +}
110 +
111 +# TODO: fix me ?
112 +# src_prepare() {
113 +# sed -e 's/.* -ggdb3 .*/echo/g' -i configure.in || die 'failed to remove ggdb3 flag'
114 +# mv configure.in configure.ac
115 +# find . -name Makefile.in -exec sed -e 's@/configure.in@/configure.ac@g' -i {} \;
116 +# eautoreconf
117 +# eapply_user
118 +# }
119 +
120 +src_configure() {
121 + local conf_opts=(
122 + --libexecdir=/usr/$(get_libdir)
123 + --libdir=/usr/$(get_libdir)
124 + --localstatedir=/var
125 + --with-pidfile=/run/nxlog/nxlog.pid
126 + $(use_enable perl xm_perl)
127 + $(use_enable static-libs static)
128 + )
129 + econf "${conf_opts[@]}"
130 +}
131 +
132 +src_install() {
133 + default
134 +
135 + use static-libs || find ${D} -type f -name "*.la" -delete
136 +
137 + insinto /etc/nxlog
138 + doins packaging/debian/nxlog.conf
139 +
140 + keepdir /var/log/nxlog
141 + fowners nxlog:nxlog /var/log/nxlog
142 +
143 + keepdir /var/spool/nxlog
144 + fowners nxlog:nxlog /var/spool/nxlog
145 +
146 + newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
147 +}
148 +
149 +pkg_postinst() {
150 + einfo "See the nxlog reference manual for configuration options."
151 + einfo " http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html"
152 +}
153
154 diff --git a/licenses/NXLOG-1 b/licenses/NXLOG-1
155 new file mode 100644
156 index 0000000..eb0b245
157 --- /dev/null
158 +++ b/licenses/NXLOG-1
159 @@ -0,0 +1,92 @@
160 +NXLOG PUBLIC LICENSE v1.0
161 +
162 +1. DEFINITIONS
163 +“License” shall mean version 1.0 of the NXLOG PUBLIC LICENSE, i.e. the
164 +terms and conditions set forth in this document;
165 +“Software” shall mean the source code and object code form, all associated
166 +media, printed materials, and "online" or electronic documentation. All
167 +such software and materials are referred to herein as the "Software" and
168 +are copyrighted by Licensor;
169 +“Licensor” refers to the copyright holder of the Software, i.e. nxsec.com.
170 +
171 +2. GRANT OF LICENSE
172 +Licensor hereby grants you the following rights, provided that you comply
173 +with all of the restrictions set forth in this License and provided,
174 +further, that you distribute an unmodified copy of this License with the
175 +Software:
176 +i. You may copy and distribute verbatim (i.e. unmodified) copies of the
177 +Software as you receive it, in any medium;
178 +ii. You may modify the Software, create works based on the Software and
179 +distribute copies of such, in any medium.
180 +
181 +By downloading, using, modifying and copying the Software (or any work
182 +based on the Software), you indicate your acceptance of this license to
183 +do so, and all its terms and conditions for using, copying, distributing
184 +and modifying the Software or works based on it. Nothing other than this
185 +license grants you permission to modify, distribute the program or its
186 +derivative works. If you do not accept these terms and conditions, do not
187 +use, modify or distribute the Software.
188 +
189 +3. RESTRICTIONS ON COPYING, DISTRIBUTION AND USE
190 +The Software may be copied and distributed with or without modifications
191 +in source code and object code form and may be used for commercial and
192 +non-commercial purposes provided that the following restrictions are met:
193 +i. Distribution of the Software is prohibited if any payment is made in
194 +connection with such distribution. You may only charge a reasonable fee
195 +to cover the costs of copying and redistribution;
196 +ii. Bundling the Software with a commercial product or using it to
197 +provide commercial services is prohibited if your product or service
198 +explicitly depends on the Software to be able to operate or function.
199 +You may use the Software without modifications to provide commercial
200 +services or to bundle it with your product provided that your service or
201 +product can also operate or function without the Software.
202 +A commercial license is available if you wish to incorporate the Software
203 +into your product or service which explicitly depends on the Software to
204 +be able to operate or function.
205 +
206 +4. RESTRICTIONS ON MODIFICATION AND DERIVATIVE WORKS
207 +The Software may be modified and derivative works may be distributed only
208 +under the terms of this license with the following restrictions:
209 +i. Any modifications and enhancements to the Software, including any newly
210 +developed scripts, libraries, modules that depend on the Software, are
211 +considered derivative works (“Derivative Work”).
212 +ii. If you have modified the Software or created Derivative Work, you
213 +must cause the work to carry prominent notices stating that you have
214 +modified the Software's files and the date of any change. In each source
215 +file that you have modified, you must include a prominent notice that you
216 +have modified the file, including your name, your e-mail address (if
217 +any), and the date and purpose of the change;
218 +iii. All Derivative Works must be made public in source code form by
219 +making it accessible for download over the internet. You must also notify
220 +Licensor about the Derivative Work in e-mail;
221 +iv. All Derivative works must be distributed with an unmodified copy of
222 +this License;
223 +v. By creating a Derivative Work, you assign all copyrights relating to
224 +the modifications to Licensor. You acknowledge that Licensor will own all
225 +copyrights and Licensor may use and distribute the Derivative Work to
226 +third parties under different terms from that of this License.
227 +
228 +5. NO WARRANTIES
229 +The Software is provided “AS IS” and Licensor makes no warranty as to its
230 +use, performance, or otherwise. To the maximum extent permitted by
231 +applicable law, Licensor disclaims all other representations, warranties,
232 +and conditions, express, implied, statutory, or otherwise, including, but
233 +not limited to, implied warranties or conditions of merchantability,
234 +satisfactory quality, fitness for a particular purpose, title, and
235 +non-infringement. The entire risk arising out of use or performance of
236 +the Software remains with you.
237 +
238 +6. LIMITATION OF LIABILITY
239 +This limitation of liability is to the maximum extent permitted by
240 +applicable law. In no event shall Licensor be liable for any costs of
241 +substitute products or services, or for any special, incidental,
242 +indirect, or consequential damages whatsoever (including, without
243 +limitation, damages for loss of business profits, business interruption,
244 +or loss of business information) arising out of the use or inability to
245 +use the Software, even if Licensor has been advised of the possibility of
246 +such damages. In any case, Licensor's entire liability arising out of
247 +this Agreement shall be limited to the greater of the amount actually
248 +paid for the Software; provided, however, that if you have entered into a
249 +Technical Services Support Agreement, Licensor's entire liability
250 +regarding support services shall be governed by the terms of that
251 +agreement.