Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/inn/
Date: Mon, 02 May 2016 23:16:32
Message-Id: 1462230973.da138f2b037a8f644d747eb3a6417356400881d3.wizardedit@gentoo
1 commit: da138f2b037a8f644d747eb3a6417356400881d3
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 23:15:58 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 23:16:13 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da138f2b
7
8 net-nntp/inn: remove old versions
9
10 Package-Manager: portage-2.2.26
11
12 net-nntp/inn/inn-2.5.3-r2.ebuild | 287 ---------------------------------------
13 net-nntp/inn/inn-2.5.4.ebuild | 287 ---------------------------------------
14 net-nntp/inn/inn-2.5.5.ebuild | 287 ---------------------------------------
15 3 files changed, 861 deletions(-)
16
17 diff --git a/net-nntp/inn/inn-2.5.3-r2.ebuild b/net-nntp/inn/inn-2.5.3-r2.ebuild
18 deleted file mode 100644
19 index 5921291..0000000
20 --- a/net-nntp/inn/inn-2.5.3-r2.ebuild
21 +++ /dev/null
22 @@ -1,287 +0,0 @@
23 -# Copyright 1999-2015 Gentoo Foundation
24 -# Distributed under the terms of the GNU General Public License v2
25 -# $Id$
26 -
27 -EAPI=5
28 -PYTHON_COMPAT=( python2_7 )
29 -
30 -inherit autotools eutils multilib python-single-r1 ssl-cert toolchain-funcs
31 -
32 -DESCRIPTION="The Internet News daemon, fully featured NNTP server"
33 -HOMEPAGE="https://www.isc.org/software/inn"
34 -SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz"
35 -
36 -# GPL-2 only for init script
37 -LICENSE="ISC GPL-2+ public-domain BSD-4 BSD-2 RSA BSD MIT GPL-2"
38 -SLOT="0"
39 -KEYWORDS="~amd64 ~ppc ~x86"
40 -IUSE="berkdb innkeywords inntaggedhash ipv6 kerberos perl python sasl ssl"
41 -
42 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
43 -
44 -DEPEND="
45 - virtual/mta
46 - dev-perl/MIME-tools
47 - sys-libs/pam
48 - sys-libs/zlib
49 - kerberos? ( virtual/krb5 )
50 - sasl? ( >=dev-libs/cyrus-sasl-2 )
51 - ssl? ( dev-libs/openssl )
52 - python? ( ${PYTHON_DEPS} )
53 - berkdb? ( sys-libs/db )
54 -"
55 -RDEPEND="${DEPEND}"
56 -
57 -pkg_setup() {
58 - use python && python-single-r1_pkg_setup
59 -}
60 -
61 -src_prepare() {
62 - epatch "${FILESDIR}"/${P}-ar.patch
63 - epatch "${FILESDIR}"/${P}-tests.patch
64 -
65 - sed -e 's: -B .OLD::' -i Makefile.global.in || die
66 -
67 - # Do not treat LDFLAGS as if it contained libraries to link to
68 - sed -e 's:LDFLAGS::g' -i m4/python.m4 || die
69 -
70 - # We do not have the biff service, but we do have comsat
71 - sed -e 's:"biff":"comsat":g' -i tests/lib/getnameinfo-t.c || die
72 -
73 - eautoreconf
74 -}
75 -
76 -src_configure() {
77 - tc-export AR
78 -
79 - econf \
80 - --prefix=/usr/$(get_libdir)/news \
81 - --sysconfdir=/etc/news \
82 - --mandir=/usr/share/man \
83 - --infodir=/usr/share/info \
84 - --with-control-dir=/usr/$(get_libdir)/news/bin/control \
85 - --with-filter-dir=/usr/$(get_libdir)/news/bin/filter \
86 - --with-db-dir=/var/spool/news/db \
87 - --with-doc-dir=/usr/share/doc/${PF} \
88 - --with-spool-dir=/var/spool/news \
89 - --with-log-dir=/var/log/news \
90 - --with-run-dir=/run/news \
91 - --with-tmp-dir=/var/spool/news/tmp \
92 - --disable-libtool \
93 - --with-gnu-ld \
94 - --enable-setgid-inews \
95 - --enable-uucp-rnews \
96 - $(use_with perl) \
97 - $(use_with python) \
98 - $(use_with kerberos kerberos /usr) \
99 - $(use_with sasl) \
100 - $(use_with ssl openssl) \
101 - $(use_with berkdb berkeleydb /usr) \
102 - $(use_enable ipv6) \
103 - $(use_enable !inntaggedhash largefiles) \
104 - $(use_enable inntaggedhash tagged-hash) \
105 - $(use_enable innkeywords keywords)
106 -}
107 -
108 -src_install() {
109 - emake DESTDIR="${D}/" P="" SPECIAL="" install
110 -
111 - chown -R root:0 \
112 - "${D}"/usr/$(get_libdir)/news/$(get_libdir) \
113 - "${D}"/usr/$(get_libdir)/news/include \
114 - "${D}"/usr/share/doc \
115 - "${D}"/usr/share/man \
116 - || die
117 - chmod 644 "${D}"/etc/news/* || die
118 - chmod 640 \
119 - "${D}"/etc/news/control.ctl \
120 - "${D}"/etc/news/expire.ctl \
121 - "${D}"/etc/news/incoming.conf \
122 - "${D}"/etc/news/innfeed.conf \
123 - "${D}"/etc/news/nntpsend.ctl \
124 - "${D}"/etc/news/passwd.nntp \
125 - "${D}"/etc/news/readers.conf \
126 - || die
127 -
128 - # Prevent old db/* files from being overwritten
129 - insinto /usr/share/inn/dbexamples
130 - newins site/active.minimal active
131 - newins site/newsgroups.minimal newsgroups
132 -
133 - keepdir \
134 - /var/log/news \
135 - /var/spool/news/archive \
136 - /var/spool/news/articles \
137 - /var/spool/news/db \
138 - /var/spool/news/incoming \
139 - /var/spool/news/incoming/bad \
140 - /var/spool/news/innfeed \
141 - /var/spool/news/outgoing \
142 - /var/spool/news/overview \
143 - /var/spool/news/tmp
144 -
145 - fowners news:news /var/log/news
146 -
147 - dodoc ChangeLog MANIFEST README* doc/checklist
148 - use ipv6 && dodoc doc/IPv6-info
149 -
150 - # So other programs can build against INN
151 - insinto /usr/$(get_libdir)/news/include
152 - doins include/*.h
153 -
154 - newinitd "${FILESDIR}"/innd-r1 innd
155 -}
156 -
157 -pkg_postinst() {
158 - for db_file in active newsgroups
159 - do
160 - [[ -f ${ROOT}var/spool/news/db/${db_file} ]] && continue
161 -
162 - if [[ -f ${ROOT}usr/share/inn/dbexamples/${db_file} ]]
163 - then
164 - cp "${ROOT}"usr/share/inn/dbexamples/${db_file} \
165 - "${ROOT}"var/spool/news/db/${db_file}
166 - else
167 - touch "${ROOT}"var/spool/news/db/${db_file}
168 - fi
169 -
170 - chown news:news "${ROOT}"var/spool/news/db/${db_file}
171 - chmod 664 "${ROOT}"var/spool/news/db/${db_file}
172 - done
173 -
174 - elog "It is recommended to run emerge --config ${CATEGORY}/${PN}"
175 - elog "now to finish setting up this package."
176 - elog
177 - elog "Do not forget to update your cron entries, and also run"
178 - elog "makedbz if you need to. If this is a first-time installation"
179 - elog "a minimal active file has been installed. You will need to"
180 - elog "touch history and run 'makedbz -i' to initialize the history"
181 - elog "database. See INSTALL for more information."
182 - elog
183 - elog "You need to assign a real shell to the news user, or else"
184 - elog "starting inn will fail. You can use 'usermod -s /bin/bash news'"
185 - elog "for this."
186 -
187 - if use ssl
188 - then
189 - install_cert /etc/news/cert/cert
190 - chown news:news \
191 - "${ROOT}"etc/news/cert/cert.{crt,csr,key,pem}
192 -
193 - elog
194 - elog "You may want to start nnrpd manually for native ssl support."
195 - elog "If you choose to do so, automating this with a bootscript might"
196 - elog "also be a good choice."
197 - elog "Have a look at man nnrpd for valid parameters."
198 - elog
199 - elog "The certificate location in /etc/news/sasl.conf has been changed"
200 - elog "to /etc/news/cert!"
201 -
202 - fi
203 -}
204 -
205 -pkg_postrm() {
206 - elog
207 - elog "If you want your newsspool or altered configuration files"
208 - elog "to be removed, please do so now manually."
209 - elog
210 -}
211 -
212 -pkg_config() {
213 - NEWSSPOOL_DIR="${ROOT}var/spool/news"
214 - NEWS_SHELL="$( awk -F':' '/^news:/ {print $7;}' ${ROOT}etc/passwd )"
215 - NEWS_ERRFLAG="0"
216 -
217 - if [[ ${NEWS_SHELL} == /bin/false || ${NEWS_SHELL} == /dev/null ]]; then
218 - einfo "Changing shell to /bin/bash for user news..."
219 - usermod -s /bin/bash news
220 - else
221 - einfo "Shell for user news unchanged ('${NEWS_SHELL}')."
222 - if [[ ${NEWS_SHELL} != /bin/sh && ${NEWS_SHELL} != /bin/bash ]]; then
223 - ewarn "You might want to change it to '/bin/bash', though."
224 - fi
225 - fi
226 -
227 - if [[ ! -e ${NEWSSPOOL_DIR}/db/history ]]; then
228 - if [[ ! -f ${NEWSSPOOL_DIR}/db/history.dir \
229 - && ! -f ${NEWSSPOOL_DIR}/db/history.pag \
230 - && ! -f ${NEWSSPOOL_DIR}/db/history.hash \
231 - && ! -f ${NEWSSPOOL_DIR}/db/history.index ]]
232 - then
233 - einfo "Building history database ..."
234 -
235 - touch "${NEWSSPOOL_DIR}"/db/history
236 - chown news:news "${NEWSSPOOL_DIR}"/db/history
237 - chmod 644 "${NEWSSPOOL_DIR}"/db/history
238 -
239 - einfo "Running makedbz -i ..."
240 - su - news -c "/usr/$(get_libdir)/news/bin/makedbz -i"
241 -
242 - einfo "Moving files into place ..."
243 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && \
244 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.dir \
245 - "${NEWSSPOOL_DIR}"/db/history.dir
246 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && \
247 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.pag \
248 - "${NEWSSPOOL_DIR}"/db/history.pag
249 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && \
250 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.hash \
251 - "${NEWSSPOOL_DIR}"/db/history.hash
252 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && \
253 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.index \
254 - "${NEWSSPOOL_DIR}"/db/history.index
255 -
256 - einfo "Running makehistory ..."
257 - su - news -c /usr/$(get_libdir)/news/bin/makehistory
258 - else
259 - NEWS_ERRFLAG="1"
260 - eerror "Your installation seems to be screwed up."
261 - eerror "${NEWSSPOOL_DIR}/db/history does not exist, but there's"
262 - eerror "one of the files history.dir, history.hash or history.index"
263 - eerror "within ${NEWSSPOOL_DIR}/db."
264 - eerror "Use your backup to restore the history database."
265 - fi
266 - else
267 - einfo "${NEWSSPOOL_DIR}/db/history found."
268 - einfo "Leaving history database as it is."
269 - fi
270 -
271 - INNCFG_INODES=$(
272 - sed /etc/news/inn.conf \
273 - -e '/innwatchspoolnodes/ ! d; s:[^ ]*[ ]*\([^ ]*\):\1:'
274 - )
275 - INNSPOOL_INODES=$(
276 - df -Pi ${NEWSSPOOL_DIR} | \
277 - sed -e 's:[^ ]*[ ]*\([^ ]*\).*:\1:; 1 d'
278 - )
279 - if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]]; then
280 - ewarn "Setting innwatchspoolinodes to zero, because the filesystem behind"
281 - ewarn "$NEWSSPOOL_DIR works without inodes."
282 - ewarn
283 - cp /etc/news/inn.conf /etc/news/inn.conf.OLD
284 - einfo "A copy of your old inn.conf has been saved to /etc/news/inn.conf.OLD."
285 - sed -i /etc/news/inn.conf \
286 - -e '/innwatchspoolnodes/ s:\([^ ]*\)\([ ]*\).*:\1\20:'
287 - chown news:news /etc/news/inn.conf
288 - chmod 644 /etc/news/inn.conf
289 - fi
290 -
291 - INNCHECK_LINES=$(
292 - su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l"
293 - )
294 - if [[ ${INNCHECK_LINES} -gt 0 ]]; then
295 - NEWS_ERRFLAG="1"
296 - ewarn "inncheck most certainly found an error."
297 - ewarn "Please check its output:"
298 - eerror "`su - news -c /usr/$(get_libdir)/news/bin/inncheck`"
299 - fi
300 -
301 - if [[ ${NEWS_ERRFLAG} -gt 0 ]]; then
302 - eerror "There were one or more errors/warnings checking your"
303 - eerror "configuration. Please read inn's documentation and"
304 - eerror "fix them accordingly."
305 - else
306 - einfo "INN configuration tests passed successfully."
307 - ewarn "Please ensure you have configured inn properly."
308 - fi
309 -}
310
311 diff --git a/net-nntp/inn/inn-2.5.4.ebuild b/net-nntp/inn/inn-2.5.4.ebuild
312 deleted file mode 100644
313 index a76c4d9..0000000
314 --- a/net-nntp/inn/inn-2.5.4.ebuild
315 +++ /dev/null
316 @@ -1,287 +0,0 @@
317 -# Copyright 1999-2015 Gentoo Foundation
318 -# Distributed under the terms of the GNU General Public License v2
319 -# $Id$
320 -
321 -EAPI=5
322 -PYTHON_COMPAT=( python2_7 )
323 -
324 -inherit autotools eutils multilib python-single-r1 ssl-cert toolchain-funcs
325 -
326 -DESCRIPTION="The Internet News daemon, fully featured NNTP server"
327 -HOMEPAGE="https://www.isc.org/software/inn"
328 -SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz"
329 -
330 -# GPL-2 only for init script
331 -LICENSE="ISC GPL-2+ public-domain BSD-4 BSD-2 RSA BSD MIT GPL-2"
332 -SLOT="0"
333 -KEYWORDS="~amd64 ~ppc ~x86"
334 -IUSE="berkdb innkeywords inntaggedhash ipv6 kerberos perl python sasl ssl"
335 -
336 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
337 -
338 -DEPEND="
339 - virtual/mta
340 - dev-perl/MIME-tools
341 - sys-libs/pam
342 - sys-libs/zlib
343 - kerberos? ( virtual/krb5 )
344 - sasl? ( >=dev-libs/cyrus-sasl-2 )
345 - ssl? ( dev-libs/openssl )
346 - python? ( ${PYTHON_DEPS} )
347 - berkdb? ( sys-libs/db )
348 -"
349 -RDEPEND="${DEPEND}"
350 -
351 -pkg_setup() {
352 - use python && python-single-r1_pkg_setup
353 -}
354 -
355 -src_prepare() {
356 - epatch "${FILESDIR}"/${PN}-2.5.3-ar.patch
357 - epatch "${FILESDIR}"/${PN}-2.5.3-tests.patch
358 -
359 - sed -e 's: -B .OLD::' -i Makefile.global.in || die
360 -
361 - # Do not treat LDFLAGS as if it contained libraries to link to
362 - sed -e 's:LDFLAGS::g' -i m4/python.m4 || die
363 -
364 - # We do not have the biff service, but we do have comsat
365 - sed -e 's:"biff":"comsat":g' -i tests/lib/getnameinfo-t.c || die
366 -
367 - eautoreconf
368 -}
369 -
370 -src_configure() {
371 - tc-export AR
372 -
373 - econf \
374 - --prefix=/usr/$(get_libdir)/news \
375 - --sysconfdir=/etc/news \
376 - --mandir=/usr/share/man \
377 - --infodir=/usr/share/info \
378 - --with-control-dir=/usr/$(get_libdir)/news/bin/control \
379 - --with-filter-dir=/usr/$(get_libdir)/news/bin/filter \
380 - --with-db-dir=/var/spool/news/db \
381 - --with-doc-dir=/usr/share/doc/${PF} \
382 - --with-spool-dir=/var/spool/news \
383 - --with-log-dir=/var/log/news \
384 - --with-run-dir=/run/news \
385 - --with-tmp-dir=/var/spool/news/tmp \
386 - --disable-libtool \
387 - --with-gnu-ld \
388 - --enable-setgid-inews \
389 - --enable-uucp-rnews \
390 - $(use_with perl) \
391 - $(use_with python) \
392 - $(use_with kerberos kerberos /usr) \
393 - $(use_with sasl) \
394 - $(use_with ssl openssl) \
395 - $(use_with berkdb berkeleydb /usr) \
396 - $(use_enable ipv6) \
397 - $(use_enable !inntaggedhash largefiles) \
398 - $(use_enable inntaggedhash tagged-hash) \
399 - $(use_enable innkeywords keywords)
400 -}
401 -
402 -src_install() {
403 - emake DESTDIR="${D}/" P="" SPECIAL="" install
404 -
405 - chown -R root:0 \
406 - "${D}"/usr/$(get_libdir)/news/$(get_libdir) \
407 - "${D}"/usr/$(get_libdir)/news/include \
408 - "${D}"/usr/share/doc \
409 - "${D}"/usr/share/man \
410 - || die
411 - chmod 644 "${D}"/etc/news/* || die
412 - chmod 640 \
413 - "${D}"/etc/news/control.ctl \
414 - "${D}"/etc/news/expire.ctl \
415 - "${D}"/etc/news/incoming.conf \
416 - "${D}"/etc/news/innfeed.conf \
417 - "${D}"/etc/news/nntpsend.ctl \
418 - "${D}"/etc/news/passwd.nntp \
419 - "${D}"/etc/news/readers.conf \
420 - || die
421 -
422 - # Prevent old db/* files from being overwritten
423 - insinto /usr/share/inn/dbexamples
424 - newins site/active.minimal active
425 - newins site/newsgroups.minimal newsgroups
426 -
427 - keepdir \
428 - /var/log/news \
429 - /var/spool/news/archive \
430 - /var/spool/news/articles \
431 - /var/spool/news/db \
432 - /var/spool/news/incoming \
433 - /var/spool/news/incoming/bad \
434 - /var/spool/news/innfeed \
435 - /var/spool/news/outgoing \
436 - /var/spool/news/overview \
437 - /var/spool/news/tmp
438 -
439 - fowners news:news /var/log/news
440 -
441 - dodoc ChangeLog MANIFEST README* doc/checklist
442 - use ipv6 && dodoc doc/IPv6-info
443 -
444 - # So other programs can build against INN
445 - insinto /usr/$(get_libdir)/news/include
446 - doins include/*.h
447 -
448 - newinitd "${FILESDIR}"/innd-r1 innd
449 -}
450 -
451 -pkg_postinst() {
452 - for db_file in active newsgroups
453 - do
454 - [[ -f ${ROOT}var/spool/news/db/${db_file} ]] && continue
455 -
456 - if [[ -f ${ROOT}usr/share/inn/dbexamples/${db_file} ]]
457 - then
458 - cp "${ROOT}"usr/share/inn/dbexamples/${db_file} \
459 - "${ROOT}"var/spool/news/db/${db_file}
460 - else
461 - touch "${ROOT}"var/spool/news/db/${db_file}
462 - fi
463 -
464 - chown news:news "${ROOT}"var/spool/news/db/${db_file}
465 - chmod 664 "${ROOT}"var/spool/news/db/${db_file}
466 - done
467 -
468 - elog "It is recommended to run emerge --config ${CATEGORY}/${PN}"
469 - elog "now to finish setting up this package."
470 - elog
471 - elog "Do not forget to update your cron entries, and also run"
472 - elog "makedbz if you need to. If this is a first-time installation"
473 - elog "a minimal active file has been installed. You will need to"
474 - elog "touch history and run 'makedbz -i' to initialize the history"
475 - elog "database. See INSTALL for more information."
476 - elog
477 - elog "You need to assign a real shell to the news user, or else"
478 - elog "starting inn will fail. You can use 'usermod -s /bin/bash news'"
479 - elog "for this."
480 -
481 - if use ssl
482 - then
483 - install_cert /etc/news/cert/cert
484 - chown news:news \
485 - "${ROOT}"etc/news/cert/cert.{crt,csr,key,pem}
486 -
487 - elog
488 - elog "You may want to start nnrpd manually for native ssl support."
489 - elog "If you choose to do so, automating this with a bootscript might"
490 - elog "also be a good choice."
491 - elog "Have a look at man nnrpd for valid parameters."
492 - elog
493 - elog "The certificate location in /etc/news/sasl.conf has been changed"
494 - elog "to /etc/news/cert!"
495 -
496 - fi
497 -}
498 -
499 -pkg_postrm() {
500 - elog
501 - elog "If you want your newsspool or altered configuration files"
502 - elog "to be removed, please do so now manually."
503 - elog
504 -}
505 -
506 -pkg_config() {
507 - NEWSSPOOL_DIR="${ROOT}var/spool/news"
508 - NEWS_SHELL="$( awk -F':' '/^news:/ {print $7;}' ${ROOT}etc/passwd )"
509 - NEWS_ERRFLAG="0"
510 -
511 - if [[ ${NEWS_SHELL} == /bin/false || ${NEWS_SHELL} == /dev/null ]]; then
512 - einfo "Changing shell to /bin/bash for user news..."
513 - usermod -s /bin/bash news
514 - else
515 - einfo "Shell for user news unchanged ('${NEWS_SHELL}')."
516 - if [[ ${NEWS_SHELL} != /bin/sh && ${NEWS_SHELL} != /bin/bash ]]; then
517 - ewarn "You might want to change it to '/bin/bash', though."
518 - fi
519 - fi
520 -
521 - if [[ ! -e ${NEWSSPOOL_DIR}/db/history ]]; then
522 - if [[ ! -f ${NEWSSPOOL_DIR}/db/history.dir \
523 - && ! -f ${NEWSSPOOL_DIR}/db/history.pag \
524 - && ! -f ${NEWSSPOOL_DIR}/db/history.hash \
525 - && ! -f ${NEWSSPOOL_DIR}/db/history.index ]]
526 - then
527 - einfo "Building history database ..."
528 -
529 - touch "${NEWSSPOOL_DIR}"/db/history
530 - chown news:news "${NEWSSPOOL_DIR}"/db/history
531 - chmod 644 "${NEWSSPOOL_DIR}"/db/history
532 -
533 - einfo "Running makedbz -i ..."
534 - su - news -c "/usr/$(get_libdir)/news/bin/makedbz -i"
535 -
536 - einfo "Moving files into place ..."
537 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && \
538 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.dir \
539 - "${NEWSSPOOL_DIR}"/db/history.dir
540 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && \
541 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.pag \
542 - "${NEWSSPOOL_DIR}"/db/history.pag
543 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && \
544 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.hash \
545 - "${NEWSSPOOL_DIR}"/db/history.hash
546 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && \
547 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.index \
548 - "${NEWSSPOOL_DIR}"/db/history.index
549 -
550 - einfo "Running makehistory ..."
551 - su - news -c /usr/$(get_libdir)/news/bin/makehistory
552 - else
553 - NEWS_ERRFLAG="1"
554 - eerror "Your installation seems to be screwed up."
555 - eerror "${NEWSSPOOL_DIR}/db/history does not exist, but there's"
556 - eerror "one of the files history.dir, history.hash or history.index"
557 - eerror "within ${NEWSSPOOL_DIR}/db."
558 - eerror "Use your backup to restore the history database."
559 - fi
560 - else
561 - einfo "${NEWSSPOOL_DIR}/db/history found."
562 - einfo "Leaving history database as it is."
563 - fi
564 -
565 - INNCFG_INODES=$(
566 - sed /etc/news/inn.conf \
567 - -e '/innwatchspoolnodes/ ! d; s:[^ ]*[ ]*\([^ ]*\):\1:'
568 - )
569 - INNSPOOL_INODES=$(
570 - df -Pi ${NEWSSPOOL_DIR} | \
571 - sed -e 's:[^ ]*[ ]*\([^ ]*\).*:\1:; 1 d'
572 - )
573 - if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]]; then
574 - ewarn "Setting innwatchspoolinodes to zero, because the filesystem behind"
575 - ewarn "$NEWSSPOOL_DIR works without inodes."
576 - ewarn
577 - cp /etc/news/inn.conf /etc/news/inn.conf.OLD
578 - einfo "A copy of your old inn.conf has been saved to /etc/news/inn.conf.OLD."
579 - sed -i /etc/news/inn.conf \
580 - -e '/innwatchspoolnodes/ s:\([^ ]*\)\([ ]*\).*:\1\20:'
581 - chown news:news /etc/news/inn.conf
582 - chmod 644 /etc/news/inn.conf
583 - fi
584 -
585 - INNCHECK_LINES=$(
586 - su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l"
587 - )
588 - if [[ ${INNCHECK_LINES} -gt 0 ]]; then
589 - NEWS_ERRFLAG="1"
590 - ewarn "inncheck most certainly found an error."
591 - ewarn "Please check its output:"
592 - eerror "`su - news -c /usr/$(get_libdir)/news/bin/inncheck`"
593 - fi
594 -
595 - if [[ ${NEWS_ERRFLAG} -gt 0 ]]; then
596 - eerror "There were one or more errors/warnings checking your"
597 - eerror "configuration. Please read inn's documentation and"
598 - eerror "fix them accordingly."
599 - else
600 - einfo "INN configuration tests passed successfully."
601 - ewarn "Please ensure you have configured inn properly."
602 - fi
603 -}
604
605 diff --git a/net-nntp/inn/inn-2.5.5.ebuild b/net-nntp/inn/inn-2.5.5.ebuild
606 deleted file mode 100644
607 index a76c4d9..0000000
608 --- a/net-nntp/inn/inn-2.5.5.ebuild
609 +++ /dev/null
610 @@ -1,287 +0,0 @@
611 -# Copyright 1999-2015 Gentoo Foundation
612 -# Distributed under the terms of the GNU General Public License v2
613 -# $Id$
614 -
615 -EAPI=5
616 -PYTHON_COMPAT=( python2_7 )
617 -
618 -inherit autotools eutils multilib python-single-r1 ssl-cert toolchain-funcs
619 -
620 -DESCRIPTION="The Internet News daemon, fully featured NNTP server"
621 -HOMEPAGE="https://www.isc.org/software/inn"
622 -SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz"
623 -
624 -# GPL-2 only for init script
625 -LICENSE="ISC GPL-2+ public-domain BSD-4 BSD-2 RSA BSD MIT GPL-2"
626 -SLOT="0"
627 -KEYWORDS="~amd64 ~ppc ~x86"
628 -IUSE="berkdb innkeywords inntaggedhash ipv6 kerberos perl python sasl ssl"
629 -
630 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
631 -
632 -DEPEND="
633 - virtual/mta
634 - dev-perl/MIME-tools
635 - sys-libs/pam
636 - sys-libs/zlib
637 - kerberos? ( virtual/krb5 )
638 - sasl? ( >=dev-libs/cyrus-sasl-2 )
639 - ssl? ( dev-libs/openssl )
640 - python? ( ${PYTHON_DEPS} )
641 - berkdb? ( sys-libs/db )
642 -"
643 -RDEPEND="${DEPEND}"
644 -
645 -pkg_setup() {
646 - use python && python-single-r1_pkg_setup
647 -}
648 -
649 -src_prepare() {
650 - epatch "${FILESDIR}"/${PN}-2.5.3-ar.patch
651 - epatch "${FILESDIR}"/${PN}-2.5.3-tests.patch
652 -
653 - sed -e 's: -B .OLD::' -i Makefile.global.in || die
654 -
655 - # Do not treat LDFLAGS as if it contained libraries to link to
656 - sed -e 's:LDFLAGS::g' -i m4/python.m4 || die
657 -
658 - # We do not have the biff service, but we do have comsat
659 - sed -e 's:"biff":"comsat":g' -i tests/lib/getnameinfo-t.c || die
660 -
661 - eautoreconf
662 -}
663 -
664 -src_configure() {
665 - tc-export AR
666 -
667 - econf \
668 - --prefix=/usr/$(get_libdir)/news \
669 - --sysconfdir=/etc/news \
670 - --mandir=/usr/share/man \
671 - --infodir=/usr/share/info \
672 - --with-control-dir=/usr/$(get_libdir)/news/bin/control \
673 - --with-filter-dir=/usr/$(get_libdir)/news/bin/filter \
674 - --with-db-dir=/var/spool/news/db \
675 - --with-doc-dir=/usr/share/doc/${PF} \
676 - --with-spool-dir=/var/spool/news \
677 - --with-log-dir=/var/log/news \
678 - --with-run-dir=/run/news \
679 - --with-tmp-dir=/var/spool/news/tmp \
680 - --disable-libtool \
681 - --with-gnu-ld \
682 - --enable-setgid-inews \
683 - --enable-uucp-rnews \
684 - $(use_with perl) \
685 - $(use_with python) \
686 - $(use_with kerberos kerberos /usr) \
687 - $(use_with sasl) \
688 - $(use_with ssl openssl) \
689 - $(use_with berkdb berkeleydb /usr) \
690 - $(use_enable ipv6) \
691 - $(use_enable !inntaggedhash largefiles) \
692 - $(use_enable inntaggedhash tagged-hash) \
693 - $(use_enable innkeywords keywords)
694 -}
695 -
696 -src_install() {
697 - emake DESTDIR="${D}/" P="" SPECIAL="" install
698 -
699 - chown -R root:0 \
700 - "${D}"/usr/$(get_libdir)/news/$(get_libdir) \
701 - "${D}"/usr/$(get_libdir)/news/include \
702 - "${D}"/usr/share/doc \
703 - "${D}"/usr/share/man \
704 - || die
705 - chmod 644 "${D}"/etc/news/* || die
706 - chmod 640 \
707 - "${D}"/etc/news/control.ctl \
708 - "${D}"/etc/news/expire.ctl \
709 - "${D}"/etc/news/incoming.conf \
710 - "${D}"/etc/news/innfeed.conf \
711 - "${D}"/etc/news/nntpsend.ctl \
712 - "${D}"/etc/news/passwd.nntp \
713 - "${D}"/etc/news/readers.conf \
714 - || die
715 -
716 - # Prevent old db/* files from being overwritten
717 - insinto /usr/share/inn/dbexamples
718 - newins site/active.minimal active
719 - newins site/newsgroups.minimal newsgroups
720 -
721 - keepdir \
722 - /var/log/news \
723 - /var/spool/news/archive \
724 - /var/spool/news/articles \
725 - /var/spool/news/db \
726 - /var/spool/news/incoming \
727 - /var/spool/news/incoming/bad \
728 - /var/spool/news/innfeed \
729 - /var/spool/news/outgoing \
730 - /var/spool/news/overview \
731 - /var/spool/news/tmp
732 -
733 - fowners news:news /var/log/news
734 -
735 - dodoc ChangeLog MANIFEST README* doc/checklist
736 - use ipv6 && dodoc doc/IPv6-info
737 -
738 - # So other programs can build against INN
739 - insinto /usr/$(get_libdir)/news/include
740 - doins include/*.h
741 -
742 - newinitd "${FILESDIR}"/innd-r1 innd
743 -}
744 -
745 -pkg_postinst() {
746 - for db_file in active newsgroups
747 - do
748 - [[ -f ${ROOT}var/spool/news/db/${db_file} ]] && continue
749 -
750 - if [[ -f ${ROOT}usr/share/inn/dbexamples/${db_file} ]]
751 - then
752 - cp "${ROOT}"usr/share/inn/dbexamples/${db_file} \
753 - "${ROOT}"var/spool/news/db/${db_file}
754 - else
755 - touch "${ROOT}"var/spool/news/db/${db_file}
756 - fi
757 -
758 - chown news:news "${ROOT}"var/spool/news/db/${db_file}
759 - chmod 664 "${ROOT}"var/spool/news/db/${db_file}
760 - done
761 -
762 - elog "It is recommended to run emerge --config ${CATEGORY}/${PN}"
763 - elog "now to finish setting up this package."
764 - elog
765 - elog "Do not forget to update your cron entries, and also run"
766 - elog "makedbz if you need to. If this is a first-time installation"
767 - elog "a minimal active file has been installed. You will need to"
768 - elog "touch history and run 'makedbz -i' to initialize the history"
769 - elog "database. See INSTALL for more information."
770 - elog
771 - elog "You need to assign a real shell to the news user, or else"
772 - elog "starting inn will fail. You can use 'usermod -s /bin/bash news'"
773 - elog "for this."
774 -
775 - if use ssl
776 - then
777 - install_cert /etc/news/cert/cert
778 - chown news:news \
779 - "${ROOT}"etc/news/cert/cert.{crt,csr,key,pem}
780 -
781 - elog
782 - elog "You may want to start nnrpd manually for native ssl support."
783 - elog "If you choose to do so, automating this with a bootscript might"
784 - elog "also be a good choice."
785 - elog "Have a look at man nnrpd for valid parameters."
786 - elog
787 - elog "The certificate location in /etc/news/sasl.conf has been changed"
788 - elog "to /etc/news/cert!"
789 -
790 - fi
791 -}
792 -
793 -pkg_postrm() {
794 - elog
795 - elog "If you want your newsspool or altered configuration files"
796 - elog "to be removed, please do so now manually."
797 - elog
798 -}
799 -
800 -pkg_config() {
801 - NEWSSPOOL_DIR="${ROOT}var/spool/news"
802 - NEWS_SHELL="$( awk -F':' '/^news:/ {print $7;}' ${ROOT}etc/passwd )"
803 - NEWS_ERRFLAG="0"
804 -
805 - if [[ ${NEWS_SHELL} == /bin/false || ${NEWS_SHELL} == /dev/null ]]; then
806 - einfo "Changing shell to /bin/bash for user news..."
807 - usermod -s /bin/bash news
808 - else
809 - einfo "Shell for user news unchanged ('${NEWS_SHELL}')."
810 - if [[ ${NEWS_SHELL} != /bin/sh && ${NEWS_SHELL} != /bin/bash ]]; then
811 - ewarn "You might want to change it to '/bin/bash', though."
812 - fi
813 - fi
814 -
815 - if [[ ! -e ${NEWSSPOOL_DIR}/db/history ]]; then
816 - if [[ ! -f ${NEWSSPOOL_DIR}/db/history.dir \
817 - && ! -f ${NEWSSPOOL_DIR}/db/history.pag \
818 - && ! -f ${NEWSSPOOL_DIR}/db/history.hash \
819 - && ! -f ${NEWSSPOOL_DIR}/db/history.index ]]
820 - then
821 - einfo "Building history database ..."
822 -
823 - touch "${NEWSSPOOL_DIR}"/db/history
824 - chown news:news "${NEWSSPOOL_DIR}"/db/history
825 - chmod 644 "${NEWSSPOOL_DIR}"/db/history
826 -
827 - einfo "Running makedbz -i ..."
828 - su - news -c "/usr/$(get_libdir)/news/bin/makedbz -i"
829 -
830 - einfo "Moving files into place ..."
831 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && \
832 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.dir \
833 - "${NEWSSPOOL_DIR}"/db/history.dir
834 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && \
835 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.pag \
836 - "${NEWSSPOOL_DIR}"/db/history.pag
837 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && \
838 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.hash \
839 - "${NEWSSPOOL_DIR}"/db/history.hash
840 - [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && \
841 - mv -vf "${NEWSSPOOL_DIR}"/db/history.n.index \
842 - "${NEWSSPOOL_DIR}"/db/history.index
843 -
844 - einfo "Running makehistory ..."
845 - su - news -c /usr/$(get_libdir)/news/bin/makehistory
846 - else
847 - NEWS_ERRFLAG="1"
848 - eerror "Your installation seems to be screwed up."
849 - eerror "${NEWSSPOOL_DIR}/db/history does not exist, but there's"
850 - eerror "one of the files history.dir, history.hash or history.index"
851 - eerror "within ${NEWSSPOOL_DIR}/db."
852 - eerror "Use your backup to restore the history database."
853 - fi
854 - else
855 - einfo "${NEWSSPOOL_DIR}/db/history found."
856 - einfo "Leaving history database as it is."
857 - fi
858 -
859 - INNCFG_INODES=$(
860 - sed /etc/news/inn.conf \
861 - -e '/innwatchspoolnodes/ ! d; s:[^ ]*[ ]*\([^ ]*\):\1:'
862 - )
863 - INNSPOOL_INODES=$(
864 - df -Pi ${NEWSSPOOL_DIR} | \
865 - sed -e 's:[^ ]*[ ]*\([^ ]*\).*:\1:; 1 d'
866 - )
867 - if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]]; then
868 - ewarn "Setting innwatchspoolinodes to zero, because the filesystem behind"
869 - ewarn "$NEWSSPOOL_DIR works without inodes."
870 - ewarn
871 - cp /etc/news/inn.conf /etc/news/inn.conf.OLD
872 - einfo "A copy of your old inn.conf has been saved to /etc/news/inn.conf.OLD."
873 - sed -i /etc/news/inn.conf \
874 - -e '/innwatchspoolnodes/ s:\([^ ]*\)\([ ]*\).*:\1\20:'
875 - chown news:news /etc/news/inn.conf
876 - chmod 644 /etc/news/inn.conf
877 - fi
878 -
879 - INNCHECK_LINES=$(
880 - su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l"
881 - )
882 - if [[ ${INNCHECK_LINES} -gt 0 ]]; then
883 - NEWS_ERRFLAG="1"
884 - ewarn "inncheck most certainly found an error."
885 - ewarn "Please check its output:"
886 - eerror "`su - news -c /usr/$(get_libdir)/news/bin/inncheck`"
887 - fi
888 -
889 - if [[ ${NEWS_ERRFLAG} -gt 0 ]]; then
890 - eerror "There were one or more errors/warnings checking your"
891 - eerror "configuration. Please read inn's documentation and"
892 - eerror "fix them accordingly."
893 - else
894 - einfo "INN configuration tests passed successfully."
895 - ewarn "Please ensure you have configured inn properly."
896 - fi
897 -}