mkfile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. d=/n/sources/plan9
  2. x=`{9fs sources; 9fs fsother; import -c tcp!204.178.31.2!666 /sys/lib/dist/web.protect}
  3. cd:V: /n/fsother/dist/plan9.iso
  4. ncd:V: /n/fsother/dist/plan9-new.iso.bz2
  5. ncd-dist:V: /n/fsother/dist/plan9-new.iso.bz2
  6. mk /sys/lib/dist/web.protect/plan9-new.iso.bz2
  7. cd-dist:V: /n/fsother/dist/plan9.iso.bz2
  8. mk /sys/lib/dist/web.protect/plan9.iso.bz2
  9. contrib-cd:V: /n/fsother/dist/contrib.iso.bz2
  10. /n/fsother/dist/%.iso:D: /n/sources/plan9/dist/replica/plan9.log
  11. @{cd pc; mk cddisk; cd ..}
  12. rm -f $target
  13. bind pc/cddisk cdstub/bootdisk.img
  14. if(! test -f $d/bootdisk.img)
  15. bind -a cdstub $d
  16. title=`{date | sed 's/(...) (...) (..) (..:..):.. (...) (....)/Plan 9 - \2 \3 \6 \4/'}
  17. title=$"title
  18. echo 'CD:' $title
  19. disk/mk9660 -9cj -v $title -s $d \
  20. -b bootdisk.img $target
  21. /sys/lib/dist/web.protect/%.iso.bz2: /n/fsother/dist/%.iso.bz2
  22. cp $prereq $target
  23. scan:V:
  24. replica/scan /sys/lib/dist/sources.replica <scan.lock
  25. compresslog:V:
  26. awk -f logcompress.awk $d/dist/replica/plan9.log | awk -f logtime.awk -v 't='^`{date -n} >/tmp/plan9.log
  27. rm $d/dist/replica/plan9.log
  28. cp /tmp/plan9.log $d/dist/replica/plan9.log
  29. #restart:V:
  30. # rm -f $d/dist/replica/plan9.db
  31. # rm -f $d/dist/replica/plan9.log
  32. # chmod 664 $d/dist/replica/plan9.db >$d/dist/replica/plan9.db
  33. # chmod 664 $d/dist/replica/plan9.log >$d/dist/replica/plan9.log
  34. # chmod +a $d/dist/replica/plan9.log
  35. # mk scan
  36. odump:V:
  37. disk/dump9660 -9cj -v 'Plan 9 4e Dumps' -s $d \
  38. -p /sys/lib/sysconfig/proto/allproto /n/fsother/dist/distdump.iso
  39. cd.install:V:
  40. if(~ $sysname achille){ echo; echo; echo '*** run this on a real machine, like olive.'; exit bad }
  41. bzip2 -9 < /n/fsother/dist/plan9.iso >web.protect/nplan9.iso.bz2
  42. D.install:V:
  43. D=/n/roro/usr/rob/testplan9
  44. 9fs roro
  45. cp $D/sys/lib/dist/pc/ndisk /sys/lib/dist/web.protect/ndisk
  46. cp $D/sys/lib/dist/pc/9loaddebug /sys/lib/dist/web.protect/n9loaddebug
  47. reallyinstall:V:
  48. if(! ~ $sysname achille){ echo; echo; echo '*** this needs to run on achille.'; exit bad }
  49. cd web.protect
  50. for (i in plan9.iso.bz2 disk 9loaddebug vmware.zip){
  51. if(test -f n$i){
  52. mv $i _$i && { mv n$i $i || mv _$i $i }
  53. }
  54. }
  55. rm /srv/ramfs.9down4e
  56. /sys/lib/dist/startcache
  57. dump:V:
  58. rm -f /srv/9660.xxx
  59. 9660srv 9660.xxx
  60. mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
  61. now=`{mtime /sys/lib/dist/web.protect/plan9.iso.bz2 | awk '{print $1}'}
  62. ls -l /rls/plan9/4e.iso
  63. disk/dump9660 -9cj -s /n/kremvax -n $now /rls/plan9/4e.iso
  64. ls -l /rls/plan9/4e.iso
  65. rm /srv/9660.xxx
  66. reencode:V:
  67. rm -f /n/fsother/dist/nplan9.iso
  68. rm -f /srv/9660.xxx
  69. 9660srv 9660.xxx
  70. mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
  71. disk/mk9660 -9cj -v 'Plan 9 4th Edition' -s /n/kremvax \
  72. -b bootdisk.img /n/fsother/dist/nplan9.iso
  73. rm /srv/9660.xxx
  74. /n/fsother/dist/%.iso.bz2:D: /n/fsother/dist/%.iso
  75. bzip2 -9 < /n/fsother/dist/$stem.iso > /n/fsother/dist/n$stem.iso.bz2 &&
  76. {mv /n/fsother/dist/$stem.iso.bz2 /n/fsother/dist/_$stem.iso.bz2
  77. mv /n/fsother/dist/n$stem.iso.bz2 /n/fsother/dist/$stem.iso.bz2
  78. }
  79. echo `{date} md5 `{md5sum </n/fsother/dist/$stem.iso.bz2} sha1 `{sha1sum </n/fsother/dist/$stem.iso.bz2} $stem.iso.bz2 >>/usr/web/plan9checksums.txt
  80. /n/fsother/dist/contrib.iso:DV:
  81. rm -f $target
  82. disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources -p ./contrib.proto $target
  83. rebuild-mail:V:
  84. rebuild
  85. if(test -s buildit.out){
  86. dd=`{date}
  87. dd=$"date
  88. mail -s 'nightly build errors '^$dd 9trouble <buildit.out
  89. }
  90. if(test -s checkbuild.out){
  91. dd=`{date}
  92. dd=$"date
  93. mail -s 'nightly build differences '^$dd 9trouble <checkbuild.out
  94. }
  95. status=''
  96. scansources-mail:V:
  97. dd=`{date}
  98. dd=$"dd
  99. scansources |mail -s 'nightly fs vs. martha scan '^$dd 9trouble
  100. worldwritable-mail:V:
  101. cd /n/sources; /usr/rsc/bin/$cputype/lsr -t -d | awk '$2 ~ /[2367]$/' |{grep -v '^./patch' >/sys/lib/dist/writable || status=''}
  102. if(test -s /sys/lib/dist/writable){
  103. dd=`{date}
  104. dd=$"date
  105. mail -s 'WRITABLE FILES ON SOURCES '^$dd 9trouble </sys/lib/dist/writable
  106. }
  107. status=''
  108. cd /n/sources/plan9; /usr/rsc/bin/$cputype/lsr -t -d /n/sources/plan9 | awk '$2 ~ /[2367][^2367].$/' >/sys/lib/dist/writable
  109. if(test -s /sys/lib/dist/writable){
  110. dd=`{date}
  111. dd=$"date
  112. mail -s 'non-group-writable files on sources'^$dd 9trouble </sys/lib/dist/writable
  113. }
  114. status=''
  115. /usr/rsc/bin/$cputype/lsr -t -d /sys /lib | awk '$2 ~ /[2367][^2367].$/' >/sys/lib/dist/writable
  116. if(test -s /sys/lib/dist/writable){
  117. dd=`{date}
  118. dd=$"date
  119. mail -s 'non-group-writable files on fs '^$dd 9trouble </sys/lib/dist/writable
  120. }
  121. status=''