Gentoo Archives: gentoo-commits

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