Blob Blame History Raw
Summary: The InterNetNews (INN) system, an Usenet news server.
Name: inn
Version: 2.3.2
Release: 11
Copyright: GPL
Group: System Environment/Daemons
Source0: ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.gz
Source2: inn-default-distributions
Source4: inn-cron-expire
Source5: inn-cron-rnews
Source7: inn-cron-nntpsend
Source8: innd.init
Source10: inn-faq.tar.gz
Patch: inn-2.3.1-rh.patch
BuildRequires: db3-devel
Prereq: /sbin/chkconfig, grep, textutils, sed, fileutils, sh-utils
Requires: cleanfeed, bash >= 2.0

# XXX white out bogus perl requirement for now
Provides: perl(::usr/lib/innshellvars.pl)

Buildroot: %{_tmppath}/%{name}-root

%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: Development/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 Environment/Daemons
Requires: inn

%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 10
%patch -p1 -b .rh

%build
#libtoolize --copy --force
#autoreconf
with_tmp_path=/var/lib/news/tmp ./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=/var/lib/news/tmp \
	--with-perl --enable-shared --enable-uucp-rnews \
	--enable-pgp-verify --with-sendmail=/usr/sbin/sendmail \
	--with-news-user=news --with-news-group=news --with-news-master=news

# XXX don't include <db1/ndbm.h> to avoid linking with -ldb1.
perl -pi -e 's/HAVE_DB1_NDBM_H/XXX_HAVE_DB1_NDBM_H/' ./include/config.h

make
# DBMLIB="" %{?_smp_mflags}

%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

touch     $RPM_BUILD_ROOT/var/lib/news/subscriptions
chmod 644 $RPM_BUILD_ROOT/var/lib/news/subscriptions

install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/lib/news/distributions

mkdir -p $RPM_BUILD_ROOT/etc/cron.{hourly,daily}
install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.daily/inn-cron-expire
install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.hourly/inn-cron-rnews
install %{SOURCE7} $RPM_BUILD_ROOT/etc/cron.hourly/inn-cron-nntpsend

mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/innd

touch $RPM_BUILD_ROOT/var/lib/news/history
#LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/bin/makedbz -i \
#	-f $RPM_BUILD_ROOT/var/lib/news/history
#chmod 644 $RPM_BUILD_ROOT/var/lib/news/*

# 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/cron|%config(noreplace) %attr(-,root,root) &|' | \
	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/inndstart$|%attr(4550,root,news) /usr/bin/inndstart|' | \
	sed 's|/usr/bin/startinnfeed$|%attr(4550,root,news) /usr/bin/startinnfeed|' | \
	sed 's|/usr/bin/rnews$|%attr(4550,uucp,news) /usr/bin/rnews|' > files.list
(echo "%defattr(-,news,news)" ; grep -v inews files.list | \
	egrep -v "\.(h|so|a|la)$" | \
	grep -v "/man/") > files.main
echo "%defattr(-,root,root)" > files.devel
egrep "\.(h|so|a|la)$" files.list >> files.devel

%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
chown -R news.news /var/log/news*

%triggerpostun -- inn < 2.3.0
service innd stop > /dev/null 2>&1
exit 0

%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
exit 0

%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/archive
%dir /var/spool/news/articles
%dir /var/spool/news/incoming
%dir /var/spool/news/incoming/bad
%dir /var/spool/news/innfeed
%dir /var/spool/news/outgoing
%dir /var/spool/news/overview
%dir /var/log/news
%dir /var/log/news/OLD
%dir /var/lib/news
%dir /var/lib/news/tmp
%dir /var/run/news
%defattr(-,root,root)
%{_mandir}/man[158]/*
%doc NEWS README* ChangeLog CONTRIBUTORS LICENSE HISTORY INSTALL
%doc %dir samples

%files devel -f files.devel
%defattr(-,root,root)
%{_mandir}/man3/*

%files -n inews
%defattr(-,root,root)
%attr(0755,root,root) /usr/bin/inews
%{_mandir}/man1/inews*

%changelog
* Mon Apr 08 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- startup and cron scripts unset LANG and LC_COLLATE to make
  inn more robust   (#60770)
- really link against db3
- inews requires inn #59852

* Thu Feb 28 2002 Elliot Lee <sopwith@redhat.com> 2.3.2-10
- Change db4-devel requirement to db3-devel.
- Use _smp_mflags

* Thu Jan 31 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- fix #59123

* Wed Jan 30 2002 Jeff Johnson <jbj@redhat.com>
- white out bogus perl requirement for now.
- don't include <db1/ndbm.h> to avoid linking with -ldb1.

* Sat Jan 26 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- change to db4

* Sun Jan 20 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- allow rebuilding by not using newer autoconf, adjust inn patches

* Tue Jul 24 2001 Tim Powers <timp@redhat.com>
- make inews owned by root, not the build system

* Tue Jul 24 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- fix badd attr() macro

* Sat Jul 21 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- add build req

* Fri Jul 06 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- change perms on inews

* Tue Jun 19 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 2.3.2

* Wed Feb 14 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- add startup script patch by kevin@labsysgrp.com #27421
- inews subpackage does not depend on inn anymore #24439
- fix reload and make some cleanups to the startup script #18076

* Wed Feb 07 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- add a "exit 0" to the postun script

* Wed Jan 24 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 2.3.1
- do not use --enable-tagged-hash
- move tmp dir to /var/lib/news/tmp
- add more docu
- do not call "strip" directly
- remove some of the default files as the ones in INN are ok
- do not req /etc/init.d
- do not attempt an automatic update from previous versions as
  we have to deal with different storage methods
- prepare startup script for translations
- add minimal check into startup for a history file

* Mon Jan 22 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- innreport had wrong perms
- files for the cron-jobs must be owned by root:root

* Tue Aug 29 2000 Florian La Roche <Florian.LaRoche@redhat.de>
- remove cleanfeed sources

* Mon Jul 24 2000 Florian La Roche <Florian.LaRoche@redhat.de>
- fix some perms

* Mon Jul 24 2000 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 2.2.3
- fixed many perms
- cleaned up complete build process

* Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
- move initscript back

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jul 10 2000 Bill Nottingham <notting@redhat.com>
- add fix for the verifycancels problem fron Russ Allbery
- turn them off anyways
- fix perms on inews

* Sat Jul  8 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- prereq init.d

* Tue Jun 27 2000 Than Ngo <than@redhat.de>
- /etc/rc.d/init.d -> /etc/init.d
- fix initscript

* Sun Jun 25 2000 Matt Wilson <msw@redhat.com>
- defattr root

* Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
- fix up some issues with our new gcc compiler (patch 6)
- don't do chown in the install script so we can build as nonroot

* Mon Jun 19 2000 Preston Brown <pbrown@redhat.com>
- FHS mandir

* Tue May 23 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- add inn-2.2.2-rnews.patch which is also accepted in current cvs

* Mon May 22 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- fix stupid bug in rnews cronjob
- enable controlchan in default newsfeeds config
- run "rnews -U" hourly instead of daily

* Fri May 19 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- add bug-fix to batcher from cvs version
- "su news" before starting rnews from cron

* Mon Apr  3 2000 Bill Notttingham <notting@redhat.com>
- arrgh, there is no /usr/lib/news anymore. (#10536)
- pppatch ppport for ppproper ppperl

* Thu Mar 02 2000 Cristian Gafton <gafton@redhat.com>
- remove useless filter_innd.pl so that we will get the cleanfeed one
  instead

* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
- handle compressed manpages
- other minor fixes

* Tue Dec 14 1999 Bill Nottingham <notting@redhat.com>
- update to 2.2.2

* Sun Aug 29 1999 Cristian Gafton <gafton@redhat.com>
- version 2.2.1 to fix security problems in previous inn versions
- add the faq back to the source rpm

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- initscript munging

* Tue Jun 22 1999 Jeff Johnson <jbj@redhat.com>
- fix syntax error in reload (#3636).

* Fri Jun 18 1999 Bill Nottingham <notting@redhat.com>
- don't run by default

* Sun Jun 13 1999 Jeff Johnson <jbj@redhat.com>
- mark /var/lib/news/* as %config(noreplace) (#3425)

* Thu Jun 10 1999 Dale Lovelace <dale@redhat.com>
- change su news to su - news (#3331)

* Wed Jun  2 1999 Jeff Johsnon <jbj@redhat.com>
- complete trn->inews->inn dependency (#2646)
- use f_bsize rather than f_frsize when computing blocks avail (#3154).
- increase client timeout to 30 mins (=1800) (#2833).
- add missing includes to inn-devel (#2904).

* Mon May 31 1999 Jeff Johnson <jbj@redhat.com>
- fix owner and permissions on /var/lib/news/.news.daily (#2354).

* 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.