Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-nntp/inn: ChangeLog inn-2.4.3-r1.ebuild
Date: Sun, 30 Dec 2007 20:30:06
Message-Id: E1J94nG-0006iD-HQ@stork.gentoo.org
1 ulm 07/12/30 20:29:58
2
3 Modified: ChangeLog
4 Added: inn-2.4.3-r1.ebuild
5 Log:
6 Replace call to docert by install_cert, bug #201687.
7 (Portage version: 2.1.4_rc11)
8
9 Revision Changes Path
10 1.17 net-nntp/inn/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/inn/ChangeLog?rev=1.17&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/inn/ChangeLog?rev=1.17&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/inn/ChangeLog?r1=1.16&r2=1.17
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v
19 retrieving revision 1.16
20 retrieving revision 1.17
21 diff -u -r1.16 -r1.17
22 --- ChangeLog 24 Jun 2007 22:27:17 -0000 1.16
23 +++ ChangeLog 30 Dec 2007 20:29:57 -0000 1.17
24 @@ -1,6 +1,11 @@
25 # ChangeLog for net-nntp/inn
26 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v 1.16 2007/06/24 22:27:17 philantrop Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v 1.17 2007/12/30 20:29:57 ulm Exp $
29 +
30 +*inn-2.4.3-r1 (30 Dec 2007)
31 +
32 + 30 Dec 2007; Ulrich Mueller <ulm@g.o> +inn-2.4.3-r1.ebuild:
33 + Replace call to docert by install_cert, bug #201687.
34
35 24 Jun 2007; Wulf C. Krueger <philantrop@g.o> inn-2.4.3.ebuild:
36 Filtering -Wl,--as-needed from LDFLAGS because it breaks the compilation.
37
38
39
40 1.1 net-nntp/inn/inn-2.4.3-r1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/inn/inn-2.4.3-r1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/inn/inn-2.4.3-r1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: inn-2.4.3-r1.ebuild
46 ===================================================================
47 # Copyright 1999-2007 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/inn-2.4.3-r1.ebuild,v 1.1 2007/12/30 20:29:57 ulm Exp $
50
51 WANT_AUTOCONF="2.1"
52
53 inherit fixheadtails ssl-cert eutils multilib libtool flag-o-matic autotools
54
55 DESCRIPTION="The Internet News daemon, fully featured NNTP server"
56 HOMEPAGE="http://www.isc.org/products/INN"
57 SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz"
58
59 SLOT="0"
60 LICENSE="as-is BSD GPL-2"
61 KEYWORDS="~amd64 ~ppc ~x86"
62 IUSE="ipv6 kerberos sasl ssl perl python berkdb inntaggedhash innkeywords"
63
64 RDEPEND="virtual/mta
65 kerberos? ( virtual/krb5 )
66 sasl? ( >=dev-libs/cyrus-sasl-2 )
67 ssl? ( dev-libs/openssl )
68 perl? ( dev-lang/perl )
69 python? ( dev-lang/python )
70 berkdb? ( sys-libs/db )"
71 DEPEND="${RDEPEND}"
72
73 src_unpack() {
74 unpack ${A}
75 cd "${S}"
76
77 ht_fix_file configure.in support/fixscript.in
78
79 sed -i \
80 -e "s/ -B .OLD//" \
81 Makefile.global.in \
82 control/Makefile \
83 doc/man/Makefile
84
85 sed -i \
86 -e "s:@prefix@/lib:/etc/news/cert:" \
87 samples/sasl.conf.in
88
89 # Fixes compatibility problems with sys-libs/db-4.4 and 4.5,
90 # bug 174680.
91 epatch "${FILESDIR}/${P}-berkdb45.patch"
92
93 # Fixes problems with the test suite.
94 epatch "${FILESDIR}/${P}-runtests.patch"
95 }
96
97 src_compile() {
98 elibtoolize
99
100 filter-ldflags -Wl,--as-needed
101 append-ldflags $(bindnow-flags)
102
103 econf \
104 --prefix=/usr/$(get_libdir)/news \
105 --mandir=/usr/share/man \
106 --infodir=/usr/share/info \
107 --with-control-dir=/usr/$(get_libdir)/news/bin/control \
108 --with-etc-dir=/etc/news \
109 --with-filter-dir=/usr/$(get_libdir)/news/bin/filter \
110 --with-db-dir=/var/spool/news/db \
111 --with-doc-dir=/usr/share/doc/${PF} \
112 --with-spool-dir=/var/spool/news \
113 --with-log-dir=/var/log/news \
114 --with-run-dir=/var/run/news \
115 --with-tmp-path=/var/spool/news/tmp \
116 --enable-libtool \
117 --enable-setgid-inews \
118 --enable-uucp-rnews \
119 --without-tcl \
120 $(use_with perl) \
121 $(use_with python) \
122 $(use_with kerberos kerberos /usr) \
123 $(use_with sasl) \
124 $(use_with ssl openssl) \
125 $(use_with berkdb berkeleydb /usr) \
126 $(use_enable ipv6) \
127 $(use_enable !inntaggedhash largefiles) \
128 $(use_enable inntaggedhash tagged-hash) \
129 $(use_enable innkeywords keywords) \
130 || die "econf failed"
131 emake -j1 P="" || die "emake failed"
132 }
133
134 src_install() {
135 make DESTDIR="${D}/" P="" SPECIAL="" install || die "make install failed"
136
137 chown -R root:0 "${D}"/usr/{$(get_libdir)/news/{lib,include},share/{doc,man}}
138 chmod 644 "${D}"/etc/news/*
139 for file in control.ctl expire.ctl incoming.conf nntpsend.ctl passwd.nntp readers.conf
140 do
141 chmod 640 "${D}"/etc/news/${file}
142 done
143
144 # Prevent old db/* files from being overwritten
145 insinto /usr/share/inn/dbexamples
146 newins site/active.minimal active
147 newins site/newsgroups.minimal newsgroups
148
149 keepdir \
150 /var/{log,run}/news \
151 /var/spool/news/{,archive,articles,db,incoming{,/bad},innfeed,outgoing,overview,tmp}
152
153 dodoc ChangeLog MANIFEST README* doc/checklist
154 use ipv6 && dodoc doc/IPv6-info
155
156 # So other programs can build against INN. (eg. Suck)
157 insinto /usr/$(get_libdir)/news/include
158 doins include/*.h
159
160 doinitd "${FILESDIR}"/innd innd
161 }
162
163 pkg_postinst() {
164 for db_file in active newsgroups
165 do
166 [[ -f ${ROOT}/var/spool/news/db/${db_file} ]] && continue
167
168 if [[ -f ${ROOT}/usr/share/inn/dbexamples/${db_file} ]]
169 then
170 cp "${ROOT}"/usr/share/inn/dbexamples/${db_file} "${ROOT}"/var/spool/news/db/${db_file}
171 else
172 touch "${ROOT}"/var/spool/news/db/${db_file}
173 fi
174
175 chown news:news "${ROOT}"/var/spool/news/db/${db_file}
176 chmod 664 "${ROOT}"/var/spool/news/db/${db_file}
177 done
178
179 elog "Do not forget to update your cron entries, and also run"
180 elog "makedbz if you need to. If this is a first-time installation"
181 elog "a minimal active file has been installed. You will need to"
182 elog "touch history and run 'makedbz -i' to initialize the history"
183 elog "database. See INSTALL for more information."
184 elog
185 elog "You need to assign a real shell to the news user, or else"
186 elog "starting inn will fail. You can use 'usermod -s /bin/bash news'"
187 elog "for this."
188
189 if use ssl
190 then
191 install_cert /etc/news/cert/cert
192 chown news:news "${ROOT}"/etc/news/cert/cert.{crt,csr,key,pem}
193
194 elog
195 elog "You may want to start nnrpd manually for native ssl support."
196 elog "If you choose to do so, automating this with a bootscript might"
197 elog "also be a good choice."
198 elog "Have a look at man nnrpd for valid parameters."
199 elog
200 elog "The certificate location in /etc/news/sasl.conf has been changed"
201 elog "to /etc/news/cert!"
202
203 fi
204 }
205
206 pkg_postrm() {
207 elog
208 elog "If you want your newsspool or altered configuration files"
209 elog "to be removed, please do so now manually."
210 elog
211 }
212
213 pkg_config() {
214 NEWSSPOOL_DIR="${ROOT}/var/spool/news"
215 NEWS_SHELL="`awk -F':' '/^news:/ {print $7;}' ${ROOT}/etc/passwd`"
216 NEWS_ERRFLAG="0"
217
218 if [[ ${NEWS_SHELL} == /bin/false || ${NEWS_SHELL} == /dev/null ]]
219 then
220 if [ ${UID} -eq 0 ]
221 then
222 einfo "Changing shell to /bin/bash for user news..."
223 usermod -s /bin/bash news
224 else
225 NEWS_ERRFLAG=1
226 eerror
227 eerror "Could not change shell for user news."
228 eerror "Please run 'usermod -s /bin/bash news' as root."
229 fi
230 else
231 einfo "Shell for user news unchanged ('${NEWS_SHELL}')."
232 if [[ ${NEWS_SHELL} != /bin/sh && ${NEWS_SHELL} != /bin/bash ]]
233 then
234 ewarn "You might want to change it to '/bin/bash', though."
235 fi
236 fi
237
238 if [[ ! -e ${NEWSSPOOL_DIR}/db/history ]]
239 then
240 if [[ ! -f ${NEWSSPOOL_DIR}/db/history.dir \
241 && ! -f ${NEWSSPOOL_DIR}/db/history.pag \
242 && ! -f ${NEWSSPOOL_DIR}/db/history.hash \
243 && ! -f ${NEWSSPOOL_DIR}/db/history.index ]]
244 then
245 einfo "Building history database..."
246
247 touch "${NEWSSPOOL_DIR}"/db/history
248 chown news:news "${NEWSSPOOL_DIR}"/db/history
249 chmod 644 "${NEWSSPOOL_DIR}"/db/history
250
251 su - news -c "/usr/$(get_libdir)/news/bin/makedbz -i"
252 [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.dir "${NEWSSPOOL_DIR}"/db/history.dir
253 [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.pag "${NEWSSPOOL_DIR}"/db/history.pag
254 [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.hash "${NEWSSPOOL_DIR}"/db/history.hash
255 [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.index "${NEWSSPOOL_DIR}"/db/history.index
256 su - news -c /usr/$(get_libdir)/news/bin/makehistory
257 else
258 NEWS_ERRFLAG="1"
259 eerror
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. Leaving history database as it is."
268 fi
269
270 INNCFG_INODES="$(sed -e '/innwatchspoolnodes/ ! d' /etc/news/inn.conf | sed -e 's/[^ ]*[ ]*\([^ ]*\)/\1/')"
271 INNSPOOL_INODES="$(df -Pi ${NEWSSPOOL_DIR} | sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/' | sed -e '1 d')"
272 if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]]
273 then
274 ewarn "Setting innwatchspoolinodes to zero, because the filesystem behind"
275 ewarn "$NEWSSPOOL_DIR works without inodes."
276 ewarn
277 cp /etc/news/inn.conf /etc/news/inn.conf.OLD
278 einfo "A copy of your old inn.conf has been saved to /etc/news/inn.conf.OLD."
279 sed -i -e '/innwatchspoolnodes/ s/\([^ ]*\)\([ ]*\).*/\1\20/' /etc/news/inn.conf
280 chown news:news /etc/news/inn.conf
281 chmod 644 /etc/news/inn.conf
282 fi
283
284 INNCHECK_LINES="$(su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l")"
285 if [[ ${INNCHECK_LINES} -gt 0 ]]
286 then
287 NEWS_ERRFLAG="1"
288 ewarn "inncheck most certainly found an error."
289 ewarn "Please check its output:"
290 eerror "`su - news -c /usr/$(get_libdir)/news/bin/inncheck`"
291 fi
292
293 if [[ ${NEWS_ERRFLAG} -gt 0 ]]
294 then
295 eerror
296 eerror "There were one or more errors/warnings checking your configuration."
297 eerror "Please read inn's documentation and fix them accordingly."
298 else
299 einfo
300 einfo "Inn configuration tests passed successfully."
301 einfo
302 ewarn "Please ensure you configured inn properly."
303 fi
304 }
305
306
307
308 --
309 gentoo-commits@g.o mailing list