mkfile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. # /sys/lib/dist/mkfile
  2. d=/n/sources/plan9
  3. dist=/sys/lib/dist
  4. # import /sys/lib/dist/web.protect from outside
  5. x=`{9fs sources; 9fs fsother; import -c tcp!204.178.31.2!666 $dist/web.protect}
  6. cd:V: /n/fsother/dist/plan9.iso
  7. ncd:V: /n/fsother/dist/plan9-new.iso.bz2
  8. ncd-dist:V: /n/fsother/dist/plan9-new.iso.bz2
  9. mk $dist/web.protect/plan9-new.iso.bz2
  10. cd-dist:V: /n/fsother/dist/plan9.iso.bz2
  11. mk $dist/web.protect/plan9.iso.bz2
  12. contrib-cd:V: /n/fsother/dist/contrib.iso.bz2
  13. /n/fsother/dist/%.iso:D: /n/sources/plan9/dist/replica/plan9.log
  14. @{cd pc; mk cddisk; cd ..}
  15. rm -f $target
  16. bind pc/cddisk cdstub/bootdisk.img
  17. if(! test -f $d/bootdisk.img)
  18. bind -a cdstub $d
  19. title=`{date | sed 's/(...) (...) (..) (..:..):.. (...) (....)/Plan 9 - \2 \3 \6 \4/'}
  20. title=$"title
  21. echo 'CD:' $title
  22. disk/mk9660 -9cj -v $title -s $d -b bootdisk.img $target
  23. # try not to clobber downloads in progress
  24. $dist/web.protect/%.iso.bz2: /n/fsother/dist/%.iso.bz2
  25. cp $prereq $target.new
  26. chmod +t $target.new # don't waste venti on it
  27. if (test -e $target)
  28. mv $target $target.old
  29. mv $target.new $target
  30. scan:V:
  31. test -d /n/fsother/dist # make sure fsother was mounted above
  32. test -d $d
  33. test -d $dist/web.protect
  34. replica/scan $dist/sources.replica <scan.lock
  35. compresslog:V:
  36. awk -f logcompress.awk $d/dist/replica/plan9.log |
  37. awk -f logtime.awk -v 't='^`{date -n} >/tmp/plan9.log
  38. rm $d/dist/replica/plan9.log
  39. cp /tmp/plan9.log $d/dist/replica/plan9.log
  40. #restart:V:
  41. # rm -f $d/dist/replica/plan9.db
  42. # rm -f $d/dist/replica/plan9.log
  43. # chmod 664 $d/dist/replica/plan9.db >$d/dist/replica/plan9.db
  44. # chmod 664 $d/dist/replica/plan9.log >$d/dist/replica/plan9.log
  45. # chmod +a $d/dist/replica/plan9.log
  46. # mk scan
  47. odump:V:
  48. disk/dump9660 -9cj -v 'Plan 9 4e Dumps' -s $d \
  49. -p /sys/lib/sysconfig/proto/allproto /n/fsother/dist/distdump.iso
  50. cd.install:V:
  51. if(~ $sysname achille){
  52. echo; echo; echo '*** run this on a real machine, like olive.'
  53. exit bad
  54. }
  55. bzip2 -9 < /n/fsother/dist/plan9.iso >web.protect/nplan9.iso.bz2
  56. D.install:V:
  57. D=/n/roro/usr/rob/testplan9
  58. 9fs roro
  59. test -d $D
  60. cp $D$dist/pc/ndisk $dist/web.protect/ndisk
  61. cp $D$dist/pc/9loaddebug $dist/web.protect/n9loaddebug
  62. reallyinstall:V:
  63. if(! ~ $sysname achille){
  64. echo; echo; echo '*** this needs to run on achille.'
  65. exit bad
  66. }
  67. cd web.protect
  68. for (i in plan9.iso.bz2 disk 9loaddebug vmware.zip)
  69. if(test -f n$i){
  70. mv $i _$i && { mv n$i $i || mv _$i $i }
  71. }
  72. rm /srv/ramfs.9down4e
  73. $dist/startcache
  74. dump:V:
  75. rm -f /srv/9660.xxx
  76. 9660srv 9660.xxx
  77. mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
  78. now=`{mtime $dist/web.protect/plan9.iso.bz2 | awk '{print $1}'}
  79. ls -l /rls/plan9/4e.iso
  80. disk/dump9660 -9cj -s /n/kremvax -n $now /rls/plan9/4e.iso
  81. ls -l /rls/plan9/4e.iso
  82. rm /srv/9660.xxx
  83. reencode:V:
  84. rm -f /n/fsother/dist/nplan9.iso
  85. rm -f /srv/9660.xxx
  86. 9660srv 9660.xxx
  87. mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
  88. disk/mk9660 -9cj -v 'Plan 9 4th Edition' -s /n/kremvax \
  89. -b bootdisk.img /n/fsother/dist/nplan9.iso
  90. rm /srv/9660.xxx
  91. /n/fsother/dist/%.iso.bz2:D: /n/fsother/dist/%.iso
  92. @ {
  93. cd /n/fsother/dist
  94. bzip2 -9 <$stem.iso >n$stem.iso.bz2 &&
  95. {
  96. if (test -e $stem.iso.bz2)
  97. mv $stem.iso.bz2 _$stem.iso.bz2
  98. mv n$stem.iso.bz2 $stem.iso.bz2
  99. }
  100. echo `{date} md5 `{md5sum <$stem.iso.bz2} \
  101. sha1 `{sha1sum <$stem.iso.bz2} \
  102. $stem.iso.bz2 >>/usr/web/plan9checksums.txt
  103. }
  104. /n/fsother/dist/contrib.iso:DV:
  105. rm -f $target
  106. disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources \
  107. -p ./contrib.proto $target
  108. rebuild-mail:V:
  109. rebuild
  110. datemail 'nightly build errors' 9trouble <buildit.out
  111. datemail 'nightly build differences' 9trouble <checkbuild.out
  112. status=''
  113. scansources-mail:V:
  114. scansources | datemail 'nightly fs vs. martha scan' 9trouble
  115. worldwritable-mail:V:
  116. test -e /n/sources/plan9
  117. @ {cd /n/sources; /usr/rsc/bin/$cputype/lsr -t -d} |
  118. awk '$2 ~ /[2367]$/' | grep -vf ok-writable |
  119. datemail 'WRITABLE FILES ON SOURCES' 9trouble || status=''
  120. status=''
  121. @ {
  122. cd /n/sources/plan9
  123. /usr/rsc/bin/$cputype/lsr -t -d /n/sources/plan9
  124. } |
  125. awk '$2 ~ /[2367][^2367].$/' |
  126. datemail 'non-group-writable files on sources' 9trouble
  127. status=''
  128. # use /n/boot to avoid walking the archives mounted under
  129. # /lib/vac, or other mounts or binds.
  130. rfork n
  131. 9fs boot
  132. test -e /n/boot/sys
  133. /usr/rsc/bin/$cputype/lsr -t -d /n/boot/sys /n/boot/lib |
  134. awk '$2 ~ /[2367][^2367].$/' |
  135. datemail 'non-group-writable files on fs' 9trouble
  136. status=''
  137. 9.tar.gz:V:
  138. @{
  139. rfork n
  140. 9fs sources
  141. test -e /n/sources/plan9
  142. bind -a /n/sources/plan9 /n/sources/plan9/sys/src
  143. cd /n/sources/plan9/sys/src
  144. tar c LICENSE NOTICE 9
  145. } | gzip >$target
  146. 9-export:V: 9.tar.gz
  147. 9fs sources
  148. cp 9.tar.gz /n/sources/extra/9.tgz
  149. chmod +t /n/sources/extra/9.tgz
  150. plan9.tar.bz2:V:
  151. @{
  152. rfork n
  153. 9fs sources
  154. cd /n/sources
  155. test -e /n/sources/plan9
  156. bind /n/empty /n/sources/plan9/lib/font
  157. bind /n/empty /n/sources/plan9/sys/lib/postscript/font
  158. bind /n/empty /n/sources/plan9/sys/lib/ghostscript
  159. bind /n/empty /n/sources/plan9/sys/src/cmd/gs
  160. tar c plan9/LICENSE* plan9/NOTICE plan9/*/mkfile plan9/*/include \
  161. plan9/acme/*/src plan9/acme/bin/source \
  162. plan9/^(adm cron lib lp mail rc sys tmp usr)
  163. } | bzip2 >$target
  164. plan9-export:V: plan9.tar.bz2
  165. 9fs sources
  166. mv plan9.tar.bz2 /n/sources/extra/plan9.tar.bz2
  167. chmod +t /n/sources/extra/plan9.tar.bz2