home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / CNEWS / C-NEWS.000 / c-news.patch1
Encoding:
Text File  |  1995-01-12  |  12.9 KB  |  384 lines

  1. diff -u --new-file --recursive cnews.orig/conf/again.root cnews/conf/again.root
  2. --- cnews.orig/conf/again.root    Wed Dec 31 19:00:00 1969
  3. +++ cnews/conf/again.root    Thu Jan 12 19:21:48 1995
  4. @@ -0,0 +1,7 @@
  5. +#! /bin/sh
  6. +umask 002
  7. +set -x
  8. +: setting uids for setuid programs...
  9. +/bin/chown news.news /usr/lib/newsbin/input/newsspool /usr/lib/newsbin/relay/relaynews
  10. +chmod u+s,g+s /usr/lib/newsbin/input/newsspool /usr/lib/newsbin/relay/relaynews
  11. +: done
  12. diff -u --new-file --recursive cnews.orig/conf/build.def cnews/conf/build.def
  13. --- cnews.orig/conf/build.def    Wed Dec 31 19:00:00 1969
  14. +++ cnews/conf/build.def    Thu Jan 12 19:21:48 1995
  15. @@ -0,0 +1,114 @@
  16. +# These answers are interdependent; do not edit this file!
  17. +newsuid="news"
  18. +# These answers are interdependent; do not edit this file!
  19. +newsgid="news"
  20. +# These answers are interdependent; do not edit this file!
  21. +binuid="root"
  22. +# These answers are interdependent; do not edit this file!
  23. +bingid="bin"
  24. +# These answers are interdependent; do not edit this file!
  25. +binsrc="yes"
  26. +# These answers are interdependent; do not edit this file!
  27. +mess="no"
  28. +# These answers are interdependent; do not edit this file!
  29. +unmess="no"
  30. +# These answers are interdependent; do not edit this file!
  31. +newsarts="/var/spool/news"
  32. +# These answers are interdependent; do not edit this file!
  33. +newsctl="/var/lib/news"
  34. +# These answers are interdependent; do not edit this file!
  35. +newsbin="/usr/lib/newsbin"
  36. +# These answers are interdependent; do not edit this file!
  37. +newsumask="002"
  38. +# These answers are interdependent; do not edit this file!
  39. +newsmaster="news"
  40. +# These answers are interdependent; do not edit this file!
  41. +newsconfig="/var/lib/news/bin/config"
  42. +# These answers are interdependent; do not edit this file!
  43. +chown="/bin/chown"
  44. +# These answers are interdependent; do not edit this file!
  45. +chboth="yes"
  46. +# These answers are interdependent; do not edit this file!
  47. +chgrp="/etc/chgrp"
  48. +# These answers are interdependent; do not edit this file!
  49. +unixkind="usg"
  50. +# These answers are interdependent; do not edit this file!
  51. +addrsize="big"
  52. +# These answers are interdependent; do not edit this file!
  53. +dbmopt="-ldbm"
  54. +# These answers are interdependent; do not edit this file!
  55. +faststdio="no"
  56. +# These answers are interdependent; do not edit this file!
  57. +storeval="yes"
  58. +# These answers are interdependent; do not edit this file!
  59. +faststrchr="yes"
  60. +# These answers are interdependent; do not edit this file!
  61. +sete="yes"
  62. +# These answers are interdependent; do not edit this file!
  63. +ranlib="yes"
  64. +# These answers are interdependent; do not edit this file!
  65. +symdef="no"
  66. +# These answers are interdependent; do not edit this file!
  67. +cc="gcc"
  68. +# These answers are interdependent; do not edit this file!
  69. +copts="-O2"
  70. +# These answers are interdependent; do not edit this file!
  71. +ldopts="-s"
  72. +# These answers are interdependent; do not edit this file!
  73. +postlibs=""
  74. +# These answers are interdependent; do not edit this file!
  75. +hostname="yes"
  76. +# These answers are interdependent; do not edit this file!
  77. +uname="no"
  78. +# These answers are interdependent; do not edit this file!
  79. +uucptype="hdb"
  80. +# These answers are interdependent; do not edit this file!
  81. +dftype="statfs"
  82. +# These answers are interdependent; do not edit this file!
  83. +dfdirs="yes"
  84. +# These answers are interdependent; do not edit this file!
  85. +archive="no"
  86. +# These answers are interdependent; do not edit this file!
  87. +spacelow="no"
  88. +# These answers are interdependent; do not edit this file!
  89. +nfsgroup="no"
  90. +# These answers are interdependent; do not edit this file!
  91. +server="newsie"
  92. +# These answers are interdependent; do not edit this file!
  93. +manpages="/usr/man"
  94. +# These answers are interdependent; do not edit this file!
  95. +manmess="no"
  96. +# These answers are interdependent; do not edit this file!
  97. +rbin="/usr/bin"
  98. +# These answers are interdependent; do not edit this file!
  99. +doui="no"
  100. +# These answers are interdependent; do not edit this file!
  101. +bin="/usr/bin"
  102. +# These answers are interdependent; do not edit this file!
  103. +atok="yes"
  104. +# These answers are interdependent; do not edit this file!
  105. +postdefltdist=""
  106. +# These answers are interdependent; do not edit this file!
  107. +paranoid="no"
  108. +# These answers are interdependent; do not edit this file!
  109. +whoami="nowhere"
  110. +# These answers are interdependent; do not edit this file!
  111. +mailname="nowhere.uucp"
  112. +# These answers are interdependent; do not edit this file!
  113. +organization="Godcorp"
  114. +# These answers are interdependent; do not edit this file!
  115. +postdefltgroup=""
  116. +# These answers are interdependent; do not edit this file!
  117. +newspath="/bin:/usr/bin:/usr/sbin:/sbin"
  118. +# These answers are interdependent; do not edit this file!
  119. +fake=" dbz.o dbmclose.o"
  120. +# These answers are interdependent; do not edit this file!
  121. +fakehdrs=""
  122. +# These answers are interdependent; do not edit this file!
  123. +immediate="no"
  124. +# These answers are interdependent; do not edit this file!
  125. +inputstall="no"
  126. +# These answers are interdependent; do not edit this file!
  127. +defsub=""
  128. +# These answers are interdependent; do not edit this file!
  129. +mustsub=""
  130. diff -u --new-file --recursive cnews.orig/conf/doit.bin cnews/conf/doit.bin
  131. --- cnews.orig/conf/doit.bin    Wed Dec 31 19:00:00 1969
  132. +++ cnews/conf/doit.bin    Thu Jan 12 19:21:48 1995
  133. @@ -0,0 +1,148 @@
  134. +#! /bin/sh
  135. +# -i suppresses install, -t suppresses stdio test
  136. +# options are seen in first argument only, i.e. use -ti not -t -i
  137. +umask 002
  138. +set -x
  139. +: setting up for substitutions
  140. +cat >nsubstitutions <<'!'
  141. +# master substitutions file
  142. +#
  143. +# where the programs live (see also NEWSCONFIG)
  144. +NEWSBIN        /usr/lib/newsbin
  145. +# where the control files live
  146. +NEWSCTL        /var/lib/news
  147. +# where the articles live
  148. +NEWSARTS    /var/spool/news
  149. +# what PATH should be used for finding normal programs
  150. +# (things not in NEWSBIN, that is)
  151. +NEWSPATH    /bin:/usr/bin:/usr/sbin:/sbin
  152. +# the umask under which files should be created
  153. +NEWSUMASK    002
  154. +# who to send mail to when there is trouble
  155. +NEWSMASTER    news
  156. +# configuration file that lets shell files pick up all of this
  157. +NEWSCONFIG    /var/lib/news/bin/config
  158. +!
  159. +if test -r substitutions && cmp -s nsubstitutions substitutions
  160. +then
  161. +    rm nsubstitutions
  162. +else
  163. +    mv nsubstitutions substitutions
  164. +fi
  165. +: done
  166. +: building headers
  167. +cd ..
  168. +if test ! -d include
  169. +then
  170. +    mkdir include include/sys
  171. +fi
  172. +cd h
  173. +rm -f nnewshsed
  174. +echo "/SMALLMEM.*qqq/s;^;/* ;" >>nnewshsed
  175. +if test -f newshsed && cmp -s nnewshsed newshsed
  176. +then
  177. +    rm -f nnewshsed
  178. +else
  179. +    mv nnewshsed newshsed
  180. +fi
  181. +make all CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  182. +cd ../hfake
  183. +sed -e '/NEEDED =/s~.*~NEEDED = ~' Makefile >M.$$
  184. +mv -f M.$$ Makefile
  185. +make all CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  186. +: done
  187. +: making substitutions...
  188. +cd ../conf
  189. +make substs CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  190. +: done
  191. +: making library...
  192. +touch ../ranlibed ; sleep 2
  193. +for dir in libusg libbig libc libcnews  
  194. +do
  195. +    cd ../$dir
  196. +    make u CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  197. +done
  198. +cd ../libfake
  199. +sed -e '/NEEDED =/s/.*/NEEDED =  dbz.o dbmclose.o/' Makefile >M.$$
  200. +mv -f M.$$ Makefile
  201. +make u CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  202. +cd ../conf
  203. +make ../ranlibed CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  204. +: library done
  205. +: making spacefor, queuelen, etc....
  206. +cd ../conf
  207. +rm -f spacefor queuelen hostname setnewsids
  208. +make sf.statfs CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  209. +cp sf.statfs spacefor
  210. +make queuelen.hdb CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  211. +cp queuelen.hdb queuelen
  212. +: done
  213. +: building programs
  214. +for dir in conf batch dbz expire input relay misc explode inject
  215. +do
  216. +    cd ../$dir
  217. +    make all CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  218. +done
  219. +: done
  220. +: building prototype control files
  221. +cd ../conf
  222. +rm -f active errlog history history.pag history.dir localgroups log mailname mailpaths organization postdefltdist postdefltgroup replyusepath server sys whoami rnews.stall rnews.immed readnews.ctl
  223. +cp config.proto config
  224. +echo 'nowhere.uucp' >mailname
  225. +cat <<'!' >organization
  226. +Godcorp
  227. +!
  228. +echo 'nowhere' >whoami
  229. +echo 'general 0000000000 0000000001 y' >active
  230. +echo 'news.announce.newusers 0000000000 0000000001 y' >>active
  231. +echo 'control 0000000000 0000000001 y' >>active
  232. +echo 'junk 0000000000 0000000001 y' >>active
  233. +>errlog
  234. +>history
  235. +>history.pag
  236. +>history.dir
  237. +echo 'general    general local news' >localgroups
  238. +>log
  239. +echo 'all    uunet!%s' >mailpaths
  240. +cp sys.proto sys
  241. +cd ../expire
  242. +make explists CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm && cp explist.no explist
  243. +cd ../conf
  244. +cat >cron <<'!'
  245. +0,15,30,45 *    1-31 *    0-6    su news -c '/usr/lib/newsbin/input/newsrun'
  246. +30 8    1-31 *    1-5    su news -c '/usr/lib/newsbin/input/newsrunning off'
  247. +00 17    1-31 *    1-5    su news -c '/usr/lib/newsbin/input/newsrunning on'
  248. +40 *    1-31 *    0-6    su news -c '/usr/lib/newsbin/batch/sendbatches'
  249. +59 0    1-31 *    0-6    su news -c '/usr/lib/newsbin/expire/doexpire '
  250. +10 8    1-31 *    0-6    su news -c '/usr/lib/newsbin/maint/newsdaily'
  251. +00 5,13,21    1-31 *    0-6    su news -c '/usr/lib/newsbin/maint/newswatch | mail news'
  252. +!
  253. +echo 'su news -c /usr/lib/newsbin/maint/newsboot' >rc
  254. +: done
  255. +case "$1" in
  256. +-*i*)    exit 0    ;;
  257. +esac
  258. +: installing programs
  259. +for dir in conf batch dbz expire input relay misc explode inject
  260. +do
  261. +    cd ../$dir
  262. +    make bininstall BIN=/usr/bin RBIN=/usr/bin CC=gcc COPTS='-O2' LDFLAGS='-s' DBM=-ldbm || exit 1
  263. +done
  264. +: done
  265. +: installing manual pages
  266. +cd ../man
  267. +cp injnews.1 /usr/man/man1/injnews.1
  268. +cp active.times.5 /usr/man/man5/active.times.5
  269. +cp news.5 /usr/man/man5/news.5
  270. +cp newsctl.5 /usr/man/man5/newsctl.5
  271. +cp newsdb.5 /usr/man/man5/newsdb.5
  272. +cp newssys.5 /usr/man/man5/newssys.5
  273. +cp expire.8 /usr/man/man8/expire.8
  274. +cp explode.8 /usr/man/man8/explode.8
  275. +cp newsaux.8 /usr/man/man8/newsaux.8
  276. +cp newsbatch.8 /usr/man/man8/newsbatch.8
  277. +cp newsmail.8 /usr/man/man8/newsmail.8
  278. +cp newsmaint.8 /usr/man/man8/newsmaint.8
  279. +cp relaynews.8 /usr/man/man8/relaynews.8
  280. +cp rnews.8 /usr/man/man8/rnews.8
  281. +: done
  282. diff -u --new-file --recursive cnews.orig/conf/doit.news cnews/conf/doit.news
  283. --- cnews.orig/conf/doit.news    Wed Dec 31 19:00:00 1969
  284. +++ cnews/conf/doit.news    Thu Jan 12 19:21:48 1995
  285. @@ -0,0 +1,34 @@
  286. +#! /bin/sh
  287. +umask 002
  288. +set -x
  289. +: installing programs
  290. +for dir in conf batch dbz expire input relay misc explode inject
  291. +do
  292. +    cd ../$dir
  293. +    make newsinstall BIN=/usr/bin RBIN=/usr/bin  || exit 1
  294. +done
  295. +: done
  296. +: installing control files
  297. +cd ../conf
  298. +for f in active errlog history history.pag history.dir localgroups log mailname mailpaths organization postdefltdist postdefltgroup replyusepath server sys whoami rnews.stall rnews.immed readnews.ctl
  299. +do
  300. +    if test -r /var/lib/news/$f
  301. +    then
  302. +        echo "/var/lib/news/$f already exists; left unchanged"
  303. +    elif test ! -r $f
  304. +    then
  305. +        : "$f" not wanted
  306. +    else
  307. +        cp $f /var/lib/news/$f
  308. +    fi
  309. +done
  310. +if test -r /var/lib/news/bin/config
  311. +then
  312. +    cp /var/lib/news/bin/config /var/lib/news/bin/config.old
  313. +fi
  314. +cp config /var/lib/news/bin/config
  315. +chmod +x /var/lib/news/bin/config
  316. +: It is virtually certain that some of those control files
  317. +: need modifying to suit your system.  In particular, you
  318. +: should pick up a current 'active' file from your neighbors.
  319. +: done
  320. diff -u --new-file --recursive cnews.orig/conf/doit.root cnews/conf/doit.root
  321. --- cnews.orig/conf/doit.root    Wed Dec 31 19:00:00 1969
  322. +++ cnews/conf/doit.root    Thu Jan 12 19:20:12 1995
  323. @@ -0,0 +1,14 @@
  324. +#! /bin/sh
  325. +umask 002
  326. +set -x
  327. +: making directories...
  328. +for d in /var/spool/news /var/spool/news/in.coming /var/spool/news/in.coming/bad /var/spool/news/out.going /var/spool/news/out.master /var/lib/news /var/lib/news/bin /usr/lib/newsbin
  329. +do
  330. +    if test ! -d $d
  331. +    then
  332. +        mkdir $d
  333. +    fi
  334. +done
  335. +/bin/chown news.news /var/spool/news /var/spool/news/in.coming /var/spool/news/in.coming/bad /var/spool/news/out.going /var/spool/news/out.master /var/lib/news /var/lib/news/bin 
  336. +/bin/chown root.bin /usr/lib/newsbin 
  337. +: done
  338. diff -u --new-file --recursive cnews.orig/explode/doexplode cnews/explode/doexplode
  339. --- cnews.orig/explode/doexplode    Sat Apr 25 23:08:43 1992
  340. +++ cnews/explode/doexplode    Thu Jan 12 19:18:14 1995
  341. @@ -10,9 +10,10 @@
  342.  cd $NEWSARTS
  343.  for f in out.master/[0-9]*
  344.  do
  345. -    case "$f" in
  346. -    "out.master/[0-9]*")    break ;;    # no work
  347. -    esac
  348. +        if [ ! -f $f ] ; then continue; fi      # SMR other method no work
  349. +#       case "$f" in
  350. +#       "out.master/[0-9]*")    break ;;        # no work
  351. +#       esac
  352.      work=$f.tmp
  353.      export f work
  354.      # lock against relaynews for the mv and
  355. diff -u --new-file --recursive cnews.orig/explode/doexplode.orig cnews/explode/doexplode.orig
  356. --- cnews.orig/explode/doexplode.orig    Wed Dec 31 19:00:00 1969
  357. +++ cnews/explode/doexplode.orig    Sat Apr 25 23:08:43 1992
  358. @@ -0,0 +1,25 @@
  359. +#! /bin/sh
  360. +# explode master batch files into normal batch files
  361. +
  362. +# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  363. +. ${NEWSCONFIG-/usr/lib/news/bin/config}
  364. +
  365. +PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  366. +umask $NEWSUMASK
  367. +
  368. +cd $NEWSARTS
  369. +for f in out.master/[0-9]*
  370. +do
  371. +    case "$f" in
  372. +    "out.master/[0-9]*")    break ;;    # no work
  373. +    esac
  374. +    work=$f.tmp
  375. +    export f work
  376. +    # lock against relaynews for the mv and
  377. +    # batchers for explode.
  378. +    SHELL=/bin/sh $NEWSBIN/maint/locknews <<'!'
  379. +        mv $f $work    # move out the way of relaynews
  380. +        explode $work
  381. +        rm -f $work
  382. +!
  383. +done
  384.