Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-nntp/inn: inn-2.5.4.ebuild ChangeLog
Date: Mon, 09 Jun 2014 06:21:47
Message-Id: 20140609062143.2711F2004E@flycatcher.gentoo.org
1 patrick 14/06/09 06:21:43
2
3 Modified: ChangeLog
4 Added: inn-2.5.4.ebuild
5 Log:
6 Bump
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.56 net-nntp/inn/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nntp/inn/ChangeLog?rev=1.56&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nntp/inn/ChangeLog?rev=1.56&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nntp/inn/ChangeLog?r1=1.55&r2=1.56
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v
20 retrieving revision 1.55
21 retrieving revision 1.56
22 diff -u -r1.55 -r1.56
23 --- ChangeLog 5 Sep 2013 19:44:43 -0000 1.55
24 +++ ChangeLog 9 Jun 2014 06:21:42 -0000 1.56
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-nntp/inn
27 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v 1.55 2013/09/05 19:44:43 mgorny Exp $
29 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v 1.56 2014/06/09 06:21:42 patrick Exp $
31 +
32 +*inn-2.5.4 (09 Jun 2014)
33 +
34 + 09 Jun 2014; Patrick Lauer <patrick@g.o> +inn-2.5.4.ebuild:
35 + Bump
36
37 05 Sep 2013; Michał Górny <mgorny@g.o> inn-2.5.3-r1.ebuild,
38 inn-2.5.3-r2.ebuild:
39
40
41
42 1.1 net-nntp/inn/inn-2.5.4.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nntp/inn/inn-2.5.4.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nntp/inn/inn-2.5.4.ebuild?rev=1.1&content-type=text/plain
46
47 Index: inn-2.5.4.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/inn-2.5.4.ebuild,v 1.1 2014/06/09 06:21:42 patrick Exp $
52
53 EAPI=5
54 PYTHON_COMPAT=( python2_{6,7} )
55
56 inherit autotools eutils multilib python-single-r1 ssl-cert toolchain-funcs
57
58 DESCRIPTION="The Internet News daemon, fully featured NNTP server"
59 HOMEPAGE="https://www.isc.org/software/inn"
60 SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz"
61
62 # GPL-2 only for init script
63 LICENSE="ISC GPL-2+ public-domain BSD-4 BSD-2 RSA BSD MIT GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~ppc ~x86"
66 IUSE="berkdb innkeywords inntaggedhash ipv6 kerberos perl python sasl ssl"
67
68 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
69
70 DEPEND="
71 virtual/mta
72 dev-perl/MIME-tools
73 sys-libs/pam
74 sys-libs/zlib
75 kerberos? ( virtual/krb5 )
76 sasl? ( >=dev-libs/cyrus-sasl-2 )
77 ssl? ( dev-libs/openssl )
78 python? ( ${PYTHON_DEPS} )
79 berkdb? ( sys-libs/db )
80 "
81 RDEPEND="${DEPEND}"
82
83 pkg_setup() {
84 use python && python-single-r1_pkg_setup
85 }
86
87 src_prepare() {
88 epatch "${FILESDIR}"/${PN}-2.5.3-ar.patch
89 epatch "${FILESDIR}"/${PN}-2.5.3-tests.patch
90
91 sed -e 's: -B .OLD::' -i Makefile.global.in || die
92
93 # Do not treat LDFLAGS as if it contained libraries to link to
94 sed -e 's:LDFLAGS::g' -i m4/python.m4 || die
95
96 # We do not have the biff service, but we do have comsat
97 sed -e 's:"biff":"comsat":g' -i tests/lib/getnameinfo-t.c || die
98
99 eautoreconf
100 }
101
102 src_configure() {
103 tc-export AR
104
105 econf \
106 --prefix=/usr/$(get_libdir)/news \
107 --sysconfdir=/etc/news \
108 --mandir=/usr/share/man \
109 --infodir=/usr/share/info \
110 --with-control-dir=/usr/$(get_libdir)/news/bin/control \
111 --with-filter-dir=/usr/$(get_libdir)/news/bin/filter \
112 --with-db-dir=/var/spool/news/db \
113 --with-doc-dir=/usr/share/doc/${PF} \
114 --with-spool-dir=/var/spool/news \
115 --with-log-dir=/var/log/news \
116 --with-run-dir=/run/news \
117 --with-tmp-dir=/var/spool/news/tmp \
118 --disable-libtool \
119 --with-gnu-ld \
120 --enable-setgid-inews \
121 --enable-uucp-rnews \
122 $(use_with perl) \
123 $(use_with python) \
124 $(use_with kerberos kerberos /usr) \
125 $(use_with sasl) \
126 $(use_with ssl openssl) \
127 $(use_with berkdb berkeleydb /usr) \
128 $(use_enable ipv6) \
129 $(use_enable !inntaggedhash largefiles) \
130 $(use_enable inntaggedhash tagged-hash) \
131 $(use_enable innkeywords keywords)
132 }
133
134 src_install() {
135 emake DESTDIR="${D}/" P="" SPECIAL="" install
136
137 chown -R root:0 \
138 "${D}"/usr/$(get_libdir)/news/$(get_libdir) \
139 "${D}"/usr/$(get_libdir)/news/include \
140 "${D}"/usr/share/doc \
141 "${D}"/usr/share/man \
142 || die
143 chmod 644 "${D}"/etc/news/* || die
144 chmod 640 \
145 "${D}"/etc/news/control.ctl \
146 "${D}"/etc/news/expire.ctl \
147 "${D}"/etc/news/incoming.conf \
148 "${D}"/etc/news/innfeed.conf \
149 "${D}"/etc/news/nntpsend.ctl \
150 "${D}"/etc/news/passwd.nntp \
151 "${D}"/etc/news/readers.conf \
152 || die
153
154 # Prevent old db/* files from being overwritten
155 insinto /usr/share/inn/dbexamples
156 newins site/active.minimal active
157 newins site/newsgroups.minimal newsgroups
158
159 keepdir \
160 /var/log/news \
161 /var/spool/news/archive \
162 /var/spool/news/articles \
163 /var/spool/news/db \
164 /var/spool/news/incoming \
165 /var/spool/news/incoming/bad \
166 /var/spool/news/innfeed \
167 /var/spool/news/outgoing \
168 /var/spool/news/overview \
169 /var/spool/news/tmp
170
171 fowners news:news /var/log/news
172
173 dodoc ChangeLog MANIFEST README* doc/checklist
174 use ipv6 && dodoc doc/IPv6-info
175
176 # So other programs can build against INN
177 insinto /usr/$(get_libdir)/news/include
178 doins include/*.h
179
180 newinitd "${FILESDIR}"/innd-r1 innd
181 }
182
183 pkg_postinst() {
184 for db_file in active newsgroups
185 do
186 [[ -f ${ROOT}var/spool/news/db/${db_file} ]] && continue
187
188 if [[ -f ${ROOT}usr/share/inn/dbexamples/${db_file} ]]
189 then
190 cp "${ROOT}"usr/share/inn/dbexamples/${db_file} \
191 "${ROOT}"var/spool/news/db/${db_file}
192 else
193 touch "${ROOT}"var/spool/news/db/${db_file}
194 fi
195
196 chown news:news "${ROOT}"var/spool/news/db/${db_file}
197 chmod 664 "${ROOT}"var/spool/news/db/${db_file}
198 done
199
200 elog "It is recommended to run emerge --config ${CATEGORY}/${PN}"
201 elog "now to finish setting up this package."
202 elog
203 elog "Do not forget to update your cron entries, and also run"
204 elog "makedbz if you need to. If this is a first-time installation"
205 elog "a minimal active file has been installed. You will need to"
206 elog "touch history and run 'makedbz -i' to initialize the history"
207 elog "database. See INSTALL for more information."
208 elog
209 elog "You need to assign a real shell to the news user, or else"
210 elog "starting inn will fail. You can use 'usermod -s /bin/bash news'"
211 elog "for this."
212
213 if use ssl
214 then
215 install_cert /etc/news/cert/cert
216 chown news:news \
217 "${ROOT}"etc/news/cert/cert.{crt,csr,key,pem}
218
219 elog
220 elog "You may want to start nnrpd manually for native ssl support."
221 elog "If you choose to do so, automating this with a bootscript might"
222 elog "also be a good choice."
223 elog "Have a look at man nnrpd for valid parameters."
224 elog
225 elog "The certificate location in /etc/news/sasl.conf has been changed"
226 elog "to /etc/news/cert!"
227
228 fi
229 }
230
231 pkg_postrm() {
232 elog
233 elog "If you want your newsspool or altered configuration files"
234 elog "to be removed, please do so now manually."
235 elog
236 }
237
238 pkg_config() {
239 NEWSSPOOL_DIR="${ROOT}var/spool/news"
240 NEWS_SHELL="$( awk -F':' '/^news:/ {print $7;}' ${ROOT}etc/passwd )"
241 NEWS_ERRFLAG="0"
242
243 if [[ ${NEWS_SHELL} == /bin/false || ${NEWS_SHELL} == /dev/null ]]; then
244 einfo "Changing shell to /bin/bash for user news..."
245 usermod -s /bin/bash news
246 else
247 einfo "Shell for user news unchanged ('${NEWS_SHELL}')."
248 if [[ ${NEWS_SHELL} != /bin/sh && ${NEWS_SHELL} != /bin/bash ]]; then
249 ewarn "You might want to change it to '/bin/bash', though."
250 fi
251 fi
252
253 if [[ ! -e ${NEWSSPOOL_DIR}/db/history ]]; then
254 if [[ ! -f ${NEWSSPOOL_DIR}/db/history.dir \
255 && ! -f ${NEWSSPOOL_DIR}/db/history.pag \
256 && ! -f ${NEWSSPOOL_DIR}/db/history.hash \
257 && ! -f ${NEWSSPOOL_DIR}/db/history.index ]]
258 then
259 einfo "Building history database ..."
260
261 touch "${NEWSSPOOL_DIR}"/db/history
262 chown news:news "${NEWSSPOOL_DIR}"/db/history
263 chmod 644 "${NEWSSPOOL_DIR}"/db/history
264
265 einfo "Running makedbz -i ..."
266 su - news -c "/usr/$(get_libdir)/news/bin/makedbz -i"
267
268 einfo "Moving files into place ..."
269 [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && \
270 mv -vf "${NEWSSPOOL_DIR}"/db/history.n.dir \
271 "${NEWSSPOOL_DIR}"/db/history.dir
272 [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && \
273 mv -vf "${NEWSSPOOL_DIR}"/db/history.n.pag \
274 "${NEWSSPOOL_DIR}"/db/history.pag
275 [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && \
276 mv -vf "${NEWSSPOOL_DIR}"/db/history.n.hash \
277 "${NEWSSPOOL_DIR}"/db/history.hash
278 [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && \
279 mv -vf "${NEWSSPOOL_DIR}"/db/history.n.index \
280 "${NEWSSPOOL_DIR}"/db/history.index
281
282 einfo "Running makehistory ..."
283 su - news -c /usr/$(get_libdir)/news/bin/makehistory
284 else
285 NEWS_ERRFLAG="1"
286 eerror "Your installation seems to be screwed up."
287 eerror "${NEWSSPOOL_DIR}/db/history does not exist, but there's"
288 eerror "one of the files history.dir, history.hash or history.index"
289 eerror "within ${NEWSSPOOL_DIR}/db."
290 eerror "Use your backup to restore the history database."
291 fi
292 else
293 einfo "${NEWSSPOOL_DIR}/db/history found."
294 einfo "Leaving history database as it is."
295 fi
296
297 INNCFG_INODES=$(
298 sed /etc/news/inn.conf \
299 -e '/innwatchspoolnodes/ ! d; s:[^ ]*[ ]*\([^ ]*\):\1:'
300 )
301 INNSPOOL_INODES=$(
302 df -Pi ${NEWSSPOOL_DIR} | \
303 sed -e 's:[^ ]*[ ]*\([^ ]*\).*:\1:; 1 d'
304 )
305 if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]]; then
306 ewarn "Setting innwatchspoolinodes to zero, because the filesystem behind"
307 ewarn "$NEWSSPOOL_DIR works without inodes."
308 ewarn
309 cp /etc/news/inn.conf /etc/news/inn.conf.OLD
310 einfo "A copy of your old inn.conf has been saved to /etc/news/inn.conf.OLD."
311 sed -i /etc/news/inn.conf \
312 -e '/innwatchspoolnodes/ s:\([^ ]*\)\([ ]*\).*:\1\20:'
313 chown news:news /etc/news/inn.conf
314 chmod 644 /etc/news/inn.conf
315 fi
316
317 INNCHECK_LINES=$(
318 su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l"
319 )
320 if [[ ${INNCHECK_LINES} -gt 0 ]]; then
321 NEWS_ERRFLAG="1"
322 ewarn "inncheck most certainly found an error."
323 ewarn "Please check its output:"
324 eerror "`su - news -c /usr/$(get_libdir)/news/bin/inncheck`"
325 fi
326
327 if [[ ${NEWS_ERRFLAG} -gt 0 ]]; then
328 eerror "There were one or more errors/warnings checking your"
329 eerror "configuration. Please read inn's documentation and"
330 eerror "fix them accordingly."
331 else
332 einfo "INN configuration tests passed successfully."
333 ewarn "Please ensure you have configured inn properly."
334 fi
335 }