Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
server:mail
inn
inn-2.6.5.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File inn-2.6.5.diff of Package inn
Index: inn-2.6.5/README.linux =================================================================== --- /dev/null +++ inn-2.6.5/README.linux @@ -0,0 +1,95 @@ +Installing a news system: Florian La Roche +========================= + +The INN news system is installed under the directories /etc/news, +@LIBEXECDIR@/news, /var/lib/news, /var/spool/news and /var/log/news. +@LIBEXECDIR@/news contains only binaries and files that normally do not need +changes. All config files are in /etc/news, the database files in +/var/lib/news and the log files in /var/log/news. + +Inn supports multiple storage methods, if you use the "tradspool" +method all news articles will get stored in /var/spool/news/articles, +"tradindexed" overview goes into /var/spool/news/overview. + +rnews is in /usr/bin/rnews and inews is in /usr/bin/inews and +@LIBEXECDIR@/news/inews (deprecated). + +Many things have to be done as user "news". So you should give the "news" +user a normal password and work on that account. + +Here are some hints on how to get a running INN: +- "/var/lib/news/active" is the list of all newsgroups and + "/var/lib/news/newsgroups" contains a description of these newsgroups. + You should copy these two files from your upstream news server. Maybe + look at "man getlist" to find out how to do this without an account + on that machine. + You can also get these files on ftp://ftp.isc.org/pub/usenet/CONFIG/. +- the minimal set of files in /etc/news you probably have to configure: + inn.conf: main config file for many INN programs + incoming.conf: to accept news from the upstream servers + newsfeeds: to send new news-postings to the upstream news server + expire.ctl: tell INN how long to keep news articles +- please look at /etc/news/crontab.sample for things that you might want + to start from cron +- Important further files in /etc/news (could be changed later on...): + readers.conf: who is allowd to read and/or post news + control.ctl: what to do with control messages (add/delete/check newsgroups) + subscriptions: the default list of newsgroups for people reading the first + time news + storage.conf/cycbuff.conf: if you don't use the traditional storing method +- You can use "rcinn start" and "rcinn stop" to start/stop your news system. + (You can do this either as user "news" or as user "root".) + If there are no errors in the syslog-files, you can enable inn in your + startup scripts. + + +Upgrading from inn-2.2 +====================== + +Whereas old versions of inn allowed you to turn off the storage +API, inn since version 2.3 uses it exclusively to store articles. +Because of this, + 1) the history file has a different format, + 2) the overview database has a different layout, + 3) articles are stored in /var/spool/news/articles instead of + /var/spool/news. + +You have two options for the upgrade: + +a) delete all the old articles and start over with a fresh spool, or +b) convert all articles to the new format. + +First of all you have to check your configuration files: + +inn.conf: + lots of things are new, please copy the new version of the + file (inn.conf.rpmnew) to inn.conf and change it to your + needs. + +nnrp.access: + no longer exists. It is now called "readers.conf" and uses + a different syntax. + +storage.conf: + here you can decide which storage format should be used. The + shipped version is configured for "tradspool", which is the + same format the old inn used. Another interesting method is + "cnfs", which uses raw partitions or big buffer files to + store the articles. If you use it, you have to configure + the cycbuff.conf file as well. You may also want to switch + to the "buffindexed" overview method if you use cnfs. + +newsfeeds: + overchan is no longer needed as innd itself now writes the + overview entries. You also have to add an entry for the + controlchan channel: + controlchan!:!*,control,control.*,!control.cancel\ + :Tc,Wnsm:@LIBEXECDIR@/news/bin/controlchan + +After that you have to decide what to do with your old articles. +We have provided an upgrade script for your convenience: convertspool. +You can use it to create a new history database and to feed all +articles into innd. If you want to start over with an empty spool +(recomended if you have lots of articles and little time), use +the "--fresh" option to just create a new history database. + Index: inn-2.6.5/backends/ninpaths.c =================================================================== --- inn-2.6.5.orig/backends/ninpaths.c +++ inn-2.6.5/backends/ninpaths.c @@ -204,6 +204,7 @@ writedumpfile(const char *n) if (d) { if (writedump(d)<0) unlink(buf); + fclose(d); } else { perror("writedumpfile: fopen failed for ninpaths"); } Index: inn-2.6.5/convertspool =================================================================== --- /dev/null +++ inn-2.6.5/convertspool @@ -0,0 +1,142 @@ +#!/bin/sh +. @LIBEXECDIR@/news/lib/innshellvars + +test -n "$UID" || UID="$(id -ru)" +test "x$UID" = x0 && { + echo "Please run me as user 'news'!" + exit 1 +} + +fresh= +if test X--fresh = "X$1"; then + fresh=true + shift +fi + +if test -n "$1"; then + echo "usage: convertspool [--fresh]" 1>&2 + exit 1 +fi + +cd ${PATHSPOOL} || exit 1 +m="moving old spool directory to /var/spool/news/oldspool" +mkdir -p oldspool +for i in *; do + case $i in + *.*) ;; + archive|articles|incoming|innfeed|outgoing|overview|tmp|oldspool) ;; + *) + test -n "$m" && echo "$m" + m= + mv $i oldspool + ;; + esac +done + +m="deleting old directories" +for i in *; do + case $i in + tradspool.map) ;; + *.*) + test -n "$m" && echo "$m" + m= + echo " - $i" + rm -rf $i + ;; + esac +done + +histhead=`head -n 1 $HISTORY 2>/dev/null` +case X"$histhead" in +X\<*) + echo "creating new history database" + test -f $HISTORY.convertspool || mv $HISTORY $HISTORY.convertspool + :> $HISTORY + rm -f $HISTORY.dir $HISTORY.pag $HISTORY.index $HISTORY.hash + if test -f $HISTORY.convertspool ; then + makedbz -f history -i -s `wc -l <$HISTORY.convertspool` + else + makedbz -f history -i + fi + ;; +esac + +if test -n "$fresh"; then + rmdir --ignore-fail-on-non-empty oldspool + test -d oldspool && echo "you can now delete $PATHSPOOL/oldspool" + echo "done." + exit 0 +fi + +#it's not easy to feed innd another config file... +mkdir -p $PATHSPOOL/oldspool/inn.conf +cat >$PATHSPOOL/oldspool/inn.conf/inn.conf <<EOF +xrefslave: true +artcutoff: 0 +EOF +cat ${NEWSETC}/inn.conf >> $PATHSPOOL/oldspool/inn.conf/inn.conf +echo "pathbin: $PATHSPOOL/oldspool/inn.conf" > $PATHSPOOL/oldspool/inn.conf/inn.conf2 +cat ${NEWSETC}/inn.conf >> $PATHSPOOL/oldspool/inn.conf/inn.conf2 +cat > $PATHSPOOL/oldspool/inn.conf/innd <<EOF +#! /bin/sh +export INNCONF=$PATHSPOOL/oldspool/inn.conf/inn.conf +exec $PATHBIN/innd "\$@" +EOF +chmod 755 $PATHSPOOL/oldspool/inn.conf/innd + +echo "starting news server" +INNCONF="$PATHSPOOL/oldspool/inn.conf/inn.conf2" INND_BIND_ADDRESS=127.0.0.1 rc.news || { + echo "Couldn't start server. Fix the problem and run me again!" + exit 1; +} +sleep 1 + +mode=`ctlinnd mode` +case $mode in +*running*) ;; +*) + echo "$mode" + echo "Server is not running. Fix the problem and run me again!" + exit 1; +esac + +echo "building article list" +cd $PATHSPOOL/oldspool || exit 1 +rm -rf spool.batch +mkdir spool.batch +find $PATHSPOOL/oldspool -name spool.batch -prune -o -name inn.conf -prune -o -type f -print > spool.batch/all +cd spool.batch || exit 1 +if test -s all ; then + count=`wc -l <all` + echo "feeding" $count "articles into the server..." + n=0 + split -a 5 -l 1000 all + for b in x*; do + cp $b y$b + $PATHBIN/innxmit -s -c 127.0.0.1 $PATHSPOOL/oldspool/spool.batch/y$b || { + echo "innxmit error. goodbye." + echo "stopping news server" + rc.news stop + exit 1 + } + touch y$b + cat $b y$b | sort | uniq -u > z$b + cat z$b | xargs rm + t=`wc -l <z$b` + count=`expr $count - $t` + echo "transmitted" $t "articles," $count "to go" + rm -f $b + test -s y$b && mv y$b $b + rm -f y$b z$b + done +fi +echo "stopping news server" +rc.news stop +echo "deleting empty directories" +cd $PATHSPOOL/oldspool || exit 1 +find $PATHSPOOL/oldspool -depth -type d -print | xargs rmdir --ignore-fail-on-non-empty +echo "cleaning up" +rm -rf spool.batch inn.conf +cd $PATHSPOOL +rmdir --ignore-fail-on-non-empty oldspool +echo "done." Index: inn-2.6.5/crontab.sample =================================================================== --- /dev/null +++ inn-2.6.5/crontab.sample @@ -0,0 +1,38 @@ +# Here are sample entries that could be added to /etc/crontab for +# your INN News-System. + + +# to expire old news-artikel +#15 4 * * * news @LIBEXECDIR@/news/bin/news.daily expireover delayrm lowmark + +# canceled articles are not removed from the overview database. so we just +# rnews stores news-artikel in /var/spool/news/in.coming, if INN ist +# not running. the next "rnews -U" will feed those news-artikel into +# inn. +#10 * * * * news /usr/bin/rnews -U + +# if you want to fetch some news-groups with suck +#59 */4 * * * news cd /local/spool/suck && suck news.server.foo.bar -c \ +# -br sucknews -r 1000000 -q && find . -name "sucknews*" \ +# -exec rnews -S localhost \{\} \; -exec rm -f \{\} \; + +# feed news via innxmit to multiple hosts, configured with nntpsend.ctl +#*/5 * * * * news @LIBEXECDIR@/news/bin/nntpsend + +# feed news for directly connected sites (if you don't use nntpsend) +#15 * * * * news @LIBEXECDIR@/news/bin/send-nntp news.server.com + +# feed news to a uucp-connected machine +#15 * * * * news @LIBEXECDIR@/news/bin/sendbatch -c wg >/dev/null +# the configuration file for this alternate perl-script is +# /etc/news/send-uucp.cf. +#15 * * * * news @LIBEXECDIR@/news/bin/send-uucp.pl + +# crontab-entry for uucp: +#20 */2 * * * uucp /usr/sbin/uucico -S wg +#20 4,6 * * * root /usr/sbin/sendmail -q +# once a month delete all news-batches that are older than 100 days +#0 6 10 * * uucp /usr/sbin/uustat --command rnews --older-than 2400 --kill-all --no-list +# generate a uucp transmission statistic +#0 6 10 * * nobody /usr/bin/tua -U + Index: inn-2.6.5/distributions =================================================================== --- /dev/null +++ inn-2.6.5/distributions @@ -0,0 +1,4 @@ +world Use no distribution rather than world +na North America +usa United States +local This site only Index: inn-2.6.5/history/Makefile =================================================================== --- inn-2.6.5.orig/history/Makefile +++ inn-2.6.5/history/Makefile @@ -51,7 +51,7 @@ $(FIXSCRIPT): @exit 1 libinnhist.la: $(OBJECTS) $(LIBSTORAGE) $(LIBINN) - $(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) \ + $(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) ../storage/*.lo ../storage/*/*.lo \ $(LIBSTORAGE) $(LIBINN) $(STORAGE_LIBS) $(LIBS) \ -rpath $(PATHLIB) -version-info $(LTVERSION) Index: inn-2.6.5/include/inn/options.h =================================================================== --- inn-2.6.5.orig/include/inn/options.h +++ inn-2.6.5/include/inn/options.h @@ -41,7 +41,7 @@ #define DEFAULT_TIMEOUT 300 /* Define if inews should put hostnames into the Path: header itself. */ -#define DO_INEWS_PATH +#undef DO_INEWS_PATH /* Define if inews should munge the GECOS entry of the passwd file when attempting to determine a poster's real name. Use this if your GECOS Index: inn-2.6.5/newsgroups =================================================================== --- /dev/null +++ inn-2.6.5/newsgroups @@ -0,0 +1,6 @@ +control Various control messages (no posting). +control.cancel Cancel messages (no posting). +control.checkgroups Hierarchy check control messages (no posting). +control.newgroup Newsgroup creation control messages (no posting). +control.rmgroup Newsgroup removal control messages (no posting). +junk Unfiled articles (no posting). Index: inn-2.6.5/nnrpd/nnrpd.c =================================================================== --- inn-2.6.5.orig/nnrpd/nnrpd.c +++ inn-2.6.5/nnrpd/nnrpd.c @@ -665,6 +665,9 @@ GetClientInfo(unsigned short port) setsockopt(STDIN_FILENO, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay)); #endif + int keepalive = 1; + setsockopt(STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(keepalive)); + notice("%s (%s) connect - port %u", Client.host, Client.ip, port); } Index: inn-2.6.5/profile =================================================================== --- /dev/null +++ inn-2.6.5/profile @@ -0,0 +1,3 @@ +PATH=@LIBEXECDIR@/news/bin:@LIBEXECDIR@/news/bin/control:$PATH +PATH=@LIBEXECDIR@/news/lib:/usr/sbin:$PATH +export PATH Index: inn-2.6.5/samples/cycbuff.conf =================================================================== --- inn-2.6.5.orig/samples/cycbuff.conf +++ inn-2.6.5/samples/cycbuff.conf @@ -28,9 +28,9 @@ refreshinterval:30 ## ## If you're trying to stay under 2 GB, keep your sizes below 2097152. -cycbuff:ONE:/export/cycbuffs/one:512000 -cycbuff:TWO:/export/cycbuffs/two:512000 -cycbuff:THREE:/export/cycbuffs/three:512000 +cycbuff:ONE:/var/spool/news/cycbuffs/one:512000 +cycbuff:TWO:/var/spool/news/cycbuffs/two:512000 +cycbuff:THREE:/var/spool/news/cycbuffs/three:512000 ## 2. Meta-cyclic buffers ## Format: Index: inn-2.6.5/samples/inn.conf.in =================================================================== --- inn-2.6.5.orig/samples/inn.conf.in +++ inn-2.6.5/samples/inn.conf.in @@ -21,7 +21,7 @@ mta: "@SENDMAIL@ organization: "A poorly-installed InterNetNews site" ovmethod: tradindexed hismethod: hisv6 -pathhost: @HOSTNAME@ +#pathhost: localhost pathnews: @prefix@ #runasuser: @@ -41,15 +41,15 @@ artcutoff: 10 #bindaddress: #bindaddress6: dontrejectfiltered: false -hiscachesize: 256 +hiscachesize: 512 ignorenewsgroups: false immediatecancel: false linecountfuzz: 0 -maxartsize: 1000000 +maxartsize: 5000000 maxconnections: 50 #pathalias: #pathcluster: -pgpverify: @DO_PGPVERIFY@ +pgpverify: true port: 119 refusecybercancels: false remembertrash: true @@ -79,7 +79,7 @@ xrefslave: false # Reading -allownewnews: true +allownewnews: false articlemmap: true clienttimeout: 1800 initialtimeout: 10 @@ -113,7 +113,7 @@ addinjectionpostinghost: true checkincludedtext: false #complaints: #fromhost: -localmaxartsize: 1000000 +localmaxartsize: 5000000 #moderatormailer: nnrpdauthsender: false #nnrpdposthost: @@ -149,7 +149,7 @@ backofftrigger: 10000 # Monitoring -doinnwatch: true +doinnwatch: false innwatchbatchspace: 4000 innwatchlibspace: 25000 innwatchloload: 1000 @@ -162,11 +162,11 @@ innwatchspoolspace: 25000 # Logging docnfsstat: false -htmlstatus: true +htmlstatus: false incominglogfrequency: 200 logartsize: true -logcancelcomm: false -logcycles: 3 +logcancelcomm: true +logcycles: 7 logipaddr: true logsitename: true logstatus: true @@ -192,7 +192,7 @@ nicekids: 4 nicenewnews: 0 nicennrpd: 0 pauseretrytime: 300 -peertimeout: 3600 +peertimeout: 1200 rlimitnofile: -1 # Paths Index: inn-2.6.5/samples/moderators =================================================================== --- inn-2.6.5.orig/samples/moderators 2022-02-18 20:36:57.000000000 +0100 +++ inn-2.6.5/samples/moderators 2022-07-14 14:47:19.354162939 +0200 @@ -20,14 +20,29 @@ ## Public hierarchies with exceptions. aioe.*:%s-newsgroup@aioe.org +bionet.*:%s@net.bio.net +bln.*:%s@fu-berlin.de +cz.*:%s@moderator.vslib.cz +de.*:%s@moderators.dana.de fido7.*:%s@fido7.org ffm.*:%s@moderators.arcornews.de fj.*:%s@moderators.fj-news.org +gnu.*:%s@prep.ai.mit.edu +han.*:%s@usenet.or.kr +hun.*:%s@sztaki.hu +linux.act.*:linux-submit@yggdrasil.com +linux.*:submit-%s@yggdrasil.com medlux.*:%s@news.medlux.ru nl.*:%s@nl.news-admin.org +nz.*:%s@usenet.net.nz perl.*:news-moderator-%s@perl.org +phil.*:%s@news.phil.uni-sb.de +pl.*:%s@usenet.pl relcom.*:%s@moderators.relcom.ru +saar.*:%s@news.phil.uni-sb.de si.*:%s@arnes.si +sk.*:%s@news.ke.sanet.sk +tnn.*:%s@news.iij.ad.jp ukr.*:%s@sita.kiev.ua ## Direct all other public hierarchies to the master moderator database. Index: inn-2.6.5/samples/storage.conf =================================================================== --- inn-2.6.5.orig/samples/storage.conf +++ inn-2.6.5/samples/storage.conf @@ -25,7 +25,7 @@ method tradspool { newsgroups: * - class: 0 + class: 1 } ## Here are some samples for a CNFS configuration. This assumes that you Index: inn-2.6.5/scripts/rc.news.in =================================================================== --- inn-2.6.5.orig/scripts/rc.news.in +++ inn-2.6.5/scripts/rc.news.in @@ -10,11 +10,11 @@ waitforpid() { - i=12 + i=60 while [ $i -gt 0 ]; do kill -0 $1 2>/dev/null || break - sleep 5 + sleep 1 printf "." i=`expr $i - 1` done @@ -77,6 +77,20 @@ Xstop) ;; esac +histhead=`head -n 1 $HISTORY 2>/dev/null` +case X"$histhead" in +X\<*) + cat <<EOM + +!!! Your history file format is no longer supported by innd. !!! +!!! Please read /usr/share/doc/packages/inn/README.linux for !!! +!!! information on how to proceed. !!! + +EOM + exit 1 + ;; +esac + ## Pick ${INND} or ${INNDSTART} WHAT=${INND}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor