mkfile 5.4 KB

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