mkfile 5.4 KB

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