%define version 2.2.2 %define release 8mdk Summary: The InterNetNews (INN) system, an Usenet news server. Name: inn Version: %{version} Release: %{release} Copyright: GPL Group: System/Servers Source0: ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.bz2 Source1: inn-default-active Source2: inn-default-distributions Source3: inn-default-newsgroups Source4: inn-cron-expire Source5: inn-cron-rnews Source6: inn-etc-nnrp.access Source7: inn-cron-nntpsend Source8: innd.init Source9: ftp://ftp.exit109.com/users/jeremy/cleanfeed-latest.tar.bz2 Source10: ftp://ftp.isc.org/pub/pgpcontrol/pgpverify-1.10 Source11: inn-faq.tar.bz2 Patch0: inn-2.2-mdk.patch.bz2 Patch1: inn-sec.patch.bz2 Patch2: inn-2.2.1-frsize.patch.bz2 Patch3: inn-perl.patch.bz2 Patch4: inn-2.2.2-batcher.patch.bz2 Patch5: inn-2.2.2-rnews.patch.bz2 Patch6: inn-2.2.2-gcc.patch.bz2 Patch7: inn-2.2.2-nonroot.patch.bz2 Patch8: inn-verifycancels-security.patch.bz2 Buildroot: %{_tmppath}/%{name}-root Prereq: /sbin/chkconfig grep textutils sed fileutils sh-utils Requires: cleanfeed, perl >= 5.0004 %description INN (InterNetNews) is a complete system for serving Usenet news and/or private newsfeeds. INN includes innd, an NNTP (NetNews Transport Protocol) server, and nnrpd, a newsreader that is spawned for each client. Both innd and nnrpd vary slightly from the NNTP protocol, but not in ways that are easily noticed. Install the inn package if you need a complete system for serving and reading Usenet news. You may also need to install inn-devel, if you are going to use a separate program which interfaces to INN, like newsgate or tin. %package devel Summary: The INN (InterNetNews) library. Group: System/Libraries Requires: inn = %{version} %description devel The inn-devel package contains the INN (InterNetNews) library, which several programs that interface with INN need in order to work (for example, newsgate and tin). If you are installing a program which must interface with the INN news system, you should install inn-devel. %package -n inews Summary: Sends Usenet articles to a local news server for distribution. Group: System/Servers %description -n inews The inews program is used by some news programs (for example, inn and trn) to post Usenet news articles to local news servers. Inews reads an article from a file or standard input, adds headers, performs some consistency checks and then sends the article to the local news server specified in the inn.conf file. Install inews if you need a program for posting Usenet articles to local news servers. %prep %setup -q -a 9 -a 11 %patch0 -p1 -b .chmou %patch1 -p1 -b .sec %patch2 -p1 -b .frsize %patch3 -p1 -b .perl %patch4 -p0 %patch5 -p1 %patch6 -p1 -b .gcc %patch7 -p1 -b .nonroot %patch8 -p1 -b .security %build rm -f config.cache libtoolize --copy --force ./configure --prefix=/usr \ --sysconfdir=/etc/news \ --mandir=%{_mandir} \ --with-log-dir=/var/log/news --with-spool-dir=/var/spool/news\ --with-db-dir=/var/lib/news --with-run-dir=/var/run/news \ --with-etc-dir=/etc/news --with-tmp-dir=/tmp \ --with-perl --enable-shared \ --enable-tagged-hash --enable-merge-to-groups \ --with-news-user=news --with-news-group=news \ --with-news-master=news --enable-pgp-verify \ --with-sendmail=/usr/sbin/sendmail %make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # -- Install man pages needed by suck et al. mkdir -p $RPM_BUILD_ROOT/usr/include/inn for f in clibrary.h configdata.h config.h dbz.h libinn.h autoconfig.h storage.h do install -c -m 0644 ./include/$f $RPM_BUILD_ROOT/usr/include/inn done mkdir -p $RPM_BUILD_ROOT/etc mv $RPM_BUILD_ROOT/usr/bin/rc.news $RPM_BUILD_ROOT/etc chmod 755 $RPM_BUILD_ROOT/etc/rc.news touch $RPM_BUILD_ROOT/var/lib/news/subscriptions chmod 644 $RPM_BUILD_ROOT/var/lib/news/subscriptions install -m 644 $RPM_SOURCE_DIR/inn-default-active \ $RPM_BUILD_ROOT/var/lib/news/active install -m 644 $RPM_SOURCE_DIR/inn-default-distributions \ $RPM_BUILD_ROOT/var/lib/news/distributions install -m 644 $RPM_SOURCE_DIR/inn-default-newsgroups \ $RPM_BUILD_ROOT/var/lib/news/newsgroups mkdir -p $RPM_BUILD_ROOT/etc/cron.hourly $RPM_BUILD_ROOT/etc/cron.daily install -m755 $RPM_SOURCE_DIR/inn-cron-expire \ $RPM_BUILD_ROOT/etc/cron.daily/inn-cron-expire install -m755 $RPM_SOURCE_DIR/inn-cron-rnews \ $RPM_BUILD_ROOT/etc/cron.hourly/inn-cron-rnews install -m755 $RPM_SOURCE_DIR/inn-cron-nntpsend \ $RPM_BUILD_ROOT/etc/cron.hourly/inn-cron-nntpsend install -m440 $RPM_SOURCE_DIR/inn-etc-nnrp.access \ $RPM_BUILD_ROOT/etc/news/nnrp.access mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ install -m 755 %{SOURCE8} \ $RPM_BUILD_ROOT/etc/rc.d/init.d/innd rm -f $RPM_BUILD_ROOT/var/lib/news/history touch $RPM_BUILD_ROOT/var/lib/news/history touch $RPM_BUILD_ROOT/var/lib/news/.news.daily LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/bin/makehistory\ -a $RPM_BUILD_ROOT/var/lib/news/active \ -i -r -f $RPM_BUILD_ROOT/var/lib/news/history || : chmod 644 $RPM_BUILD_ROOT/var/lib/news/* chmod 644 $RPM_BUILD_ROOT/var/lib/news/.news.daily # we get this from cleanfeed rm -f $RPM_BUILD_ROOT/usr/bin/filter/filter_innd.pl #Fix perms in sample directory to avoid bogus dependencies find samples -name "*.in" -exec chmod a-x {} \; #Build filelist echo "%defattr(-,news,news)" > files.list find $RPM_BUILD_ROOT -type f -or -type l | \ sed -e "s|$RPM_BUILD_ROOT||g" | \ sed 's|^/etc|%config(noreplace) &|' | \ sed 's|^/var/lib/news/|%config(noreplace) &|' | \ sed 's|.*innshellvar|%config &|' | \ sed 's|/var/log/news|%ghost &|' | \ sed 's|/usr/bin/rnews$|%attr(4550,uucp,news) /usr/bin/rnews|' | sed '/%attr(4550,uucp,news)/a\ %defattr(755,root,root)' > files.list (echo "%defattr(755,root,root)" ; grep -v inews files.list | \ egrep -v "\.(h|so|a|la)$" | \ grep -v "/man/") > files.main echo "%defattr(755,root,root)" > files.devel egrep "\.(h|so|a|la)$" files.list >> files.devel echo "%attr(-,root,root) %{_mandir}/man[158]/*" >> files.main %clean rm -rf $RPM_BUILD_ROOT rm -f files.list files.main files.devel files.inews %post /sbin/chkconfig --add innd umask 002 touch /var/log/news/news.notice touch /var/log/news/news.crit touch /var/log/news/news.err [ -f /var/lib/news/active.times ] || { touch /var/lib/news/active.times chown news.news /var/lib/news/active.times } chown -R news.news /var/log/news* if [ `cat /etc/news/inn.conf | grep '^server:' | wc -l` -lt 1 ]; then echo "server: `hostname -f`" >> /etc/news/inn.conf fi if [ -f /var/lib/news/history ]; then cd /var/lib/news /usr/bin/makehistory -i -r for i in dir hash index pag; do [ -f history.n.$i ] && mv history.n.$i history.$i done chown news.news history.* chmod 644 history.* else cd /var/lib/news cp /dev/null history /usr/bin/makehistory -i for i in dir hash index pag; do [ -f history.n.$i ] && mv history.n.$i history.$i done chown news.news history history.* chmod 644 history history.* fi %triggerin -- sysklogd if [ -f /etc/syslog.conf ]; then if ! grep -q INN /etc/syslog.conf; then sed 's/mail.none;/mail.none;news.none;/' < /etc/syslog.conf > /etc/syslog.conf.inn mv /etc/syslog.conf.inn /etc/syslog.conf echo '' \ >> /etc/syslog.conf echo '#' \ >> /etc/syslog.conf echo '# INN' \ >> /etc/syslog.conf echo '#' \ >> /etc/syslog.conf echo 'news.=crit /var/log/news/news.crit' >> /etc/syslog.conf echo 'news.=err /var/log/news/news.err' >> /etc/syslog.conf echo 'news.notice /var/log/news/news.notice' >> /etc/syslog.conf fi if [ -f /var/run/syslog.pid ]; then kill -HUP `cat /var/run/syslog.pid` 2> /dev/null ||: fi fi %preun if [ $1 = 0 ]; then service innd stop > /dev/null 2>&1 /sbin/chkconfig --del innd if [ -f /var/lib/news/history.dir ]; then rm -f /var/lib/news/history.* fi fi %postun if [ "$1" -ge "1" ]; then service innd condrestart > /dev/null 2>&1 fi %files -f files.main %defattr(-,news,news) %dir /usr/bin/control %dir /usr/bin/filter %dir /usr/bin/rnews.libexec %dir /usr/bin/auth %dir /etc/news %dir /var/spool/news %dir /var/spool/news/articles %dir /var/spool/news/overview %dir /var/spool/news/archive %dir /var/spool/news/incoming %dir /var/spool/news/incoming/bad %dir /var/spool/news/outgoing %dir /var/spool/news/uniover %dir /var/spool/news/innfeed %attr(-,news,news) %dir /var/log/news %dir /var/log/news/OLD %attr(-,news,news) %dir /var/lib/news %dir /var/run/news %attr(-,root,root) %doc samples %attr(-,root,root) %doc README* ChangeLog CONTRIBUTORS COPYRIGHT HISTORY INSTALL %attr(-,root,root) %doc faq %files devel -f files.devel %defattr(-,root,root) %{_mandir}/man3/* %files -n inews %defattr(-,root,root) %attr(755,root,root) /usr/bin/inews %{_mandir}/man1/inews* %changelog * Fri Sep 22 2000 Philippe Libat <philippe@mandrakesoft.com> 2.2.2-8mdk - change /etc/rc.news in innd.init - set correct permission file * Mon Jul 31 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.2-7mdk - Big BM cleanup merge fixes tweaking. (aka: make world). * Wed Jun 14 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.2-6mdk - Set verifycancels to false. * Tue May 02 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 2.2.2-5mdk - Removed appending of news logging, cause it is now added to the default syslog.conf file. - Patch for inn to build with latest perl. * Sun Apr 09 2000 John Buswell <johnb@mandrakesoft.com> 2.2.2-4mdk - fixed filelist - fixed permissions - removed subdirs in /bin * Thu Mar 30 2000 John Buswell <johnb@mandrakesoft.com> 2.2.2-3mdk - Fixed groups - spec-helper * Wed Dec 15 1999 John Buswell <johnb@mandrakesoft.com> - Fixed sendmail path in configure * Tue Dec 14 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 2.2.2 (y2k fix). * Fri Nov 19 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Require Perl. - Remove %defattr(-,root,root). * Thu Nov 4 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Build release. * Tue Sep 28 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Include all headers (#81 again). * Tue Sep 14 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 2.2.1 - Harald Schreiber Release ;-\. * Tue Jul 06 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Build for new environement (Rel: 12mdk). * Mon May 24 1999 Bernhard Rosenkränzer <bero@mandrakesoft.com> - chown news.news /var/lib/news/.* * Sat May 22 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com> - add security patch from RH update -9 - update cleanfeed 0.95.5a->0.95.7b - rename cleanfeed-latest to cleanfeed-0.95.7b, so we see when/if it's required to update - pgpverify 1.12 * Tue May 11 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com> - Mandrake adaptions - handle RPM_OPT_FLAGS * Tue Mar 30 1999 Preston Brown <pbrown@redhat.com> - fixed paths in cron jobs, check to see that innd is enabled * Fri Mar 26 1999 Preston Brown <pbrown@redhat.com> - path to makehistory corrected. * Mon Mar 22 1999 Preston Brown <pbrown@redhat.com> - fixed permissions on rnews for uucp * Fri Mar 19 1999 Preston Brown <pbrown@redhat.com> - make sure init scripts get packaged up, fix other minor bugs - major fixups to innd.conf for denial of service attacks, sanity, etc. - make sure history gets rebuilt in an upgrade (added to post section) - many thanks go out to mmchen@minn.net for these suggestions. * Fri Feb 19 1999 Cristian Gafton <gafton@redhat.com> - prereq all the stuff we need in the postinstall scripts * Sat Feb 6 1999 Bill Nottingham <notting@redhat.com> - strip -x bits from docs/samples (bogus dependencies) * Thu Sep 03 1998 Cristian Gafton <gafton@redhat.com> - updated to version 2.1 * Fri Aug 21 1998 Jeff Johnson <jbj@redhat.com> - innd.init chkconfig entry was incorrect (problem #855) * Tue Jun 30 1998 Jeff Johnson <jbj@redhat.com> - susbsys name must be identical to script name (problem #700) * Mon Jun 29 1998 Bryan C. Andregg <bandregg@redhat.com> - fixed startinnfeed paths * Tue May 05 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr, tr * Sat May 02 1998 Cristian Gafton <gafton@redhat.com> - enhanced initscript * Fri May 01 1998 Cristian Gafton <gafton@redhat.com> - fixed innfeed patched to be perl-version independent * Wed Apr 15 1998 Bryan C. Andregg <bandregg@redhat.com> - fixed sfnet.* entries in control.ctl * Mon Apr 13 1998 Bryan C. Andregg <bandregg@redhat.com> - moved cleanfeed to its own package * Thu Apr 09 1998 Bryan C. Andregg <bandregg@redhat.com> - added insync patches - added cleanfeed - added innfeed * Thu Apr 09 1998 Cristian Gafton <gafton@redhat.com> - abuse buildroot to simplify the file list - built against Manhattan * Tue Mar 24 1998 Bryan C. Andregg <bandregg@redhat.com> - updated to inn 1.7.2 - Added REMEMBER_TRASH and Poison patch * Sun Oct 19 1997 Erik Troan <ewt@redhat.com> - updated to inn 1.7 - added chkconfig support to the initscripts - orginally released as release 2, leving release 1 if a 4.2.x upgrade is ever necessary - don't start it in any runlevel (by default) - added inndcomm.h * Thu Oct 09 1997 Erik Troan <ewt@redhat.com> - built against glibc * Tue Aug 05 1997 Elliot Lee <sopwith@redhat.com> - Applied the 1.5.1sec and 1.5.1sec2 patches - Applied 3 more unoff patches. - Removed insanity in /etc/cron.hourly/inn-cron-nntpsend, it now just runs nntpsend as news. * Wed Apr 02 1997 Erik Troan <ewt@redhat.com> - Patch from CERT for sh exploit. - Changed /usr/ucb/compress reference to /usr/bin/compress * Mon Mar 17 1997 Erik Troan <ewt@redhat.com> - Removed inews.1 from main inn package (it's still in the inews packaeg) - Fixed references to /usr/spoo in sendbatch - added "-s -" to crosspost line in newsfeeds - /var/lib/news/active.time is now created as news.news - /etc/news/nnrp.access and /etc/news/nntpsend.ctl are mode 0440 - included a better rc script which does a better job of shutting down news - updated /etc/rc.d/rc.news output look like the rest of our initscripts - hacked sendbatch df stuff to work on machines w/o a separate /var/spool/news * Tue Mar 11 1997 Erik Troan <ewt@redhat.com> - added chmod to make sure rnews is 755 - /etc/news/nnrp.access and /etc/news/nntpsend.ctl are news.news not root.news or root.root - install an empty /var/lib/news/.news.daily as a config file - added dbz/dbz.h as /usr/include/dbz.h - added /usr/bin/inews link to /usr/lib/news/inews - changed INEWS_PATH to DONT -- I'm not sure this is right though - turned off MMAP_SYNC - added a ton of man pages which were missing from the filelist - increased CLIENT_TIMEOUT to (30 * 60) - added a postinstall to create /var/lib/news/active.times if it doesn't already exist - patched rc.news to start inn w/ -L flag - pulled news.init into a separate source file rather then creating it through a patch - added /etc/rc.d/rc5.d/S95news to the file list - remove pid files from /var/lock/news/* on shutdown - use /var/lock/subsys/news rather then /var/lock/subsys/inn or things don't shutdown properly * Mon Mar 10 1997 Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> - changed devel package description to include tin. - the devel package missed libinn.h - moved libinn.3 man-page to the devel package - moved changelog up - in %post some echo statements were messed up. if we put the redirection staements in a different line than the echo command we really should use a backslash to thell the shell :-) - in %install a chmod line referenced the same directory twice. - changed inn-1.5.1-redhat.patch: The patch for news.daily had a side effect. as EXPIREOVERFLAGS was set to '-a', expireover would break if there were articles to be removed, as '-a' can't be used if '-z' is specified... Now there is a separate 'eval expireover -a' after the first eval. Dirty but works. * Wed Feb 26 1997 Erik Troan <ewt@redhat.com> - Added a /usr/bin/rnews symlink to /usr/lib/news/rnews as other programs like to use it. * Tue Feb 25 1997 Elliot Lee <sopwith@cuc.edu> - Fixed rnews path in /etc/cron.daily/inn-cron-rnews - Added overview! and crosspost lines to /etc/news/newsfeeds - Fixed nntpsend.ctl path in /usr/lib/news/bin/nntpsend, and set a saner nntpsend.ctl config file. - Added automated inn.conf 'server: ' line creation in %post - Added misc. patches from ftp.isc.org/isc/inn/unoff-patches/1.5 - Removed -lelf from config.data LIBS - Made RPM_OPT_FLAGS work. - Bug in rpm meant that putting %post after %files made it not run. Moved %post up. - Added /etc/cron.hourly/inn-cron-nntpsend to send news every hour. - Fixed most of the misc permissions/ownership stuff that inncheck complained about. * Wed Feb 19 1997 Erik Troan <ewt@redhat.com> - Incorporated changes from <drdisk@tilx01.ti.fht-esslingen.de> which fixed some paths and restored the cron jobs which disappeared in the 1.5.1 switch. He also made the whole thing use a buildroot and added some files which were missing from the file list.